Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
[oota-llvm.git] / lib / Target / PIC16 / PIC16Section.cpp
index 7029501e6a2e92715f3e2f9e5b020243cba6af28..a96ebb8d8e3478687672c247fabc16366dec0b9a 100644 (file)
@@ -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()) {