merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.

Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to
".L4$pb".  The actual name doesn't matter and the darwin name is shorter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-09-13 18:46:37 +00:00
parent db0ce7d90f
commit 4c66f729c9
4 changed files with 102 additions and 100 deletions

View File

@@ -34,14 +34,8 @@ MCSymbol *X86MCInstLower::GetPICBaseSymbol() const {
// FIXME: the actual label generated doesn't matter here! Just mangle in
// something unique (the function number) with Private prefix.
SmallString<60> Name;
if (getSubtarget().isTargetDarwin()) {
raw_svector_ostream(Name) << 'L' << AsmPrinter.getFunctionNumber() << "$pb";
} else {
assert(getSubtarget().isTargetELF() && "Don't know how to print PIC label!");
raw_svector_ostream(Name) << ".Lllvm$" << AsmPrinter.getFunctionNumber()
<< ".$piclabel";
}
raw_svector_ostream(Name) << AsmPrinter.MAI->getPrivateGlobalPrefix()
<< AsmPrinter.getFunctionNumber() << "$pb";
return Ctx.GetOrCreateSymbol(Name.str());
}