diff options
Diffstat (limited to 'lib/Target/PIC16/PIC16Section.cpp')
-rw-r--r-- | lib/Target/PIC16/PIC16Section.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/PIC16/PIC16Section.cpp b/lib/Target/PIC16/PIC16Section.cpp index 7029501..a96ebb8 100644 --- a/lib/Target/PIC16/PIC16Section.cpp +++ b/lib/Target/PIC16/PIC16Section.cpp @@ -68,8 +68,13 @@ PIC16Section *PIC16Section::Create(const StringRef &Name, // A generic way to print all types of sections. void PIC16Section::PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS) const { - // Print name. - OS << getName() << '\t'; + + // If the section is overlaid(i.e. it has a color), print overlay name for + // it. Otherwise print its normal name. + if (Color != -1) + OS << PAN::getOverlayName(getName(), Color) << '\t'; + else + OS << getName() << '\t'; // Print type. switch (getType()) { |