summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16Section.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16Section.cpp')
-rw-r--r--llvm/lib/Target/PIC16/PIC16Section.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16Section.cpp b/llvm/lib/Target/PIC16/PIC16Section.cpp
index 7029501e6a2..a96ebb8d8e3 100644
--- a/llvm/lib/Target/PIC16/PIC16Section.cpp
+++ b/llvm/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()) {
OpenPOWER on IntegriCloud