From 7c30191393c99c9ba804f1a01942a9e130c53904 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 13 Sep 2009 19:02:16 +0000 Subject: [PATCH] remove MAI::JumpTableSpecialLabelPrefix now that MAI has real information about linker private linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81695 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 8 ++++---- lib/MC/MCAsmInfo.cpp | 1 - lib/MC/MCAsmInfoDarwin.cpp | 6 ------ 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index c6339ebfc4d..e9ddadab7c4 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -375,13 +375,13 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, if (EmittedSets.insert(JTBBs[ii])) printPICJumpTableSetLabel(i, JTBBs[ii]); - // On some targets (e.g. darwin) we want to emit two consequtive labels + // On some targets (e.g. Darwin) we want to emit two consequtive labels // before each jump table. The first label is never referenced, but tells // the assembler and linker the extents of the jump table object. The // second label is actually referenced by the code. - if (JTInDiffSection) { - if (const char *JTLabelPrefix = MAI->getJumpTableSpecialLabelPrefix()) - O << JTLabelPrefix << "JTI" << getFunctionNumber() << '_' << i << ":\n"; + if (JTInDiffSection && MAI->getLinkerPrivateGlobalPrefix()[0]) { + O << MAI->getLinkerPrivateGlobalPrefix() + << "JTI" << getFunctionNumber() << '_' << i << ":\n"; } O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp index 65625608f02..1630482de42 100644 --- a/lib/MC/MCAsmInfo.cpp +++ b/lib/MC/MCAsmInfo.cpp @@ -30,7 +30,6 @@ MCAsmInfo::MCAsmInfo() { GlobalPrefix = ""; PrivateGlobalPrefix = "."; LinkerPrivateGlobalPrefix = ""; - JumpTableSpecialLabelPrefix = 0; GlobalVarAddrPrefix = ""; GlobalVarAddrSuffix = ""; FunctionAddrPrefix = ""; diff --git a/lib/MC/MCAsmInfoDarwin.cpp b/lib/MC/MCAsmInfoDarwin.cpp index 38b9e5b90b5..d6a4e740ed5 100644 --- a/lib/MC/MCAsmInfoDarwin.cpp +++ b/lib/MC/MCAsmInfoDarwin.cpp @@ -30,11 +30,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() { InlineAsmStart = " InlineAsm Start"; InlineAsmEnd = " InlineAsm End"; - // In non-PIC modes, emit a special label before jump tables so that the - // linker can perform more accurate dead code stripping. We do not check the - // relocation model here since it can be overridden later. - JumpTableSpecialLabelPrefix = "l"; - // Directives: WeakDefDirective = "\t.weak_definition "; WeakRefDirective = "\t.weak_reference "; @@ -54,6 +49,5 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() { Is_EHSymbolPrivate = false; GlobalEHDirective = "\t.globl\t"; SupportsWeakOmittedEHFrame = false; - } -- 2.34.1