Fix the breakage caused by 76950.
authorSanjiv Gupta <sanjiv.gupta@microchip.com>
Sun, 26 Jul 2009 10:25:01 +0000 (10:25 +0000)
committerSanjiv Gupta <sanjiv.gupta@microchip.com>
Sun, 26 Jul 2009 10:25:01 +0000 (10:25 +0000)
PIC16 has special naming conventions for variables having section names specified via section attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77153 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PIC16/PIC16TargetAsmInfo.cpp

index aba1564a0563994f5db4b810068c8da23ee07e6a..192ec0803a101a0c712f9c1b78ba4023e27c19f3 100644 (file)
@@ -258,6 +258,9 @@ PIC16TargetAsmInfo::getSpecialCasedSectionGlobals(const GlobalValue *GV,
       if (SectName.compare(0, AddrStr.length(), AddrStr) == 0) {
         std::string SectAddr = SectName.substr(AddrStr.length());
         return CreateSectionForGlobal(GVar, SectAddr);
+      } else {
+        // Create the section specified with section attribute. 
+        return CreateSectionForGlobal(GVar);
       }
     }
   }