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
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
index 9e8fb5a..217eeac 100644
--- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
+++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
@@ -34,14 +34,8 @@
// 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());
}