Fix the breakage caused by 76950.

PIC16 has special naming conventions for variables having section names specified via section attribute.

llvm-svn: 77153
This commit is contained in:
Sanjiv Gupta 2009-07-26 10:25:01 +00:00
parent 6115b39ffd
commit fc4d4994ee
1 changed files with 3 additions and 0 deletions

View 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);
}
}
}