diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-21 17:30:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-21 17:30:51 +0000 |
commit | 90f8b7073dd472afb21bc33be0f24391e7a4505b (patch) | |
tree | 3f6f5178a3dd2a22d739e85705618d265adeec00 | |
parent | 7cb6860185187c74a1205deebff9e0f09a0ddae4 (diff) | |
download | llvm-90f8b7073dd472afb21bc33be0f24391e7a4505b.tar.gz llvm-90f8b7073dd472afb21bc33be0f24391e7a4505b.tar.bz2 llvm-90f8b7073dd472afb21bc33be0f24391e7a4505b.tar.xz |
Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76590 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 8 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/MachOWriter.cpp | 3 | ||||
-rw-r--r-- | lib/Target/DarwinTargetAsmInfo.cpp | 9 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 2 |
9 files changed, 17 insertions, 15 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index a89b90669a..9d76f3c058 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -239,10 +239,10 @@ namespace llvm { /// have names in the .o file. This is often "." or "L". const char *PrivateGlobalPrefix; // Defaults to "." - /// LessPrivateGlobalPrefix - This prefix is used for symbols that should + /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should /// be passed through the assembler but be removed by the linker. This /// is "l" on Darwin, currently used for some ObjC metadata. - const char *LessPrivateGlobalPrefix; // Defaults to "" + const char *LinkerPrivateGlobalPrefix; // Defaults to "" /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is /// emitted before jump tables with the specified prefix. @@ -708,8 +708,8 @@ namespace llvm { const char *getPrivateGlobalPrefix() const { return PrivateGlobalPrefix; } - const char *getLessPrivateGlobalPrefix() const { - return LessPrivateGlobalPrefix; + const char *getLinkerPrivateGlobalPrefix() const { + return LinkerPrivateGlobalPrefix; } const char *getJumpTableSpecialLabelPrefix() const { return JumpTableSpecialLabelPrefix; diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index ad6cf77b76..08eab53cf2 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -155,7 +155,7 @@ void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const { bool AsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); if (TAI->doesAllowQuotesInName()) Mang->setUseQuotes(true); diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp index a6a439a226..0ce9044e85 100644 --- a/lib/CodeGen/MachOWriter.cpp +++ b/lib/CodeGen/MachOWriter.cpp @@ -747,6 +747,7 @@ MachOSym::MachOSym(const GlobalValue *gv, std::string name, uint8_t sect, GV(gv), n_strx(0), n_type(sect == NO_SECT ? N_UNDF : N_SECT), n_sect(sect), n_desc(0), n_value(0) { + // FIXME: This is completely broken, it should use the mangler interface. switch (GV->getLinkage()) { default: llvm_unreachable("Unexpected linkage type!"); @@ -765,7 +766,7 @@ MachOSym::MachOSym(const GlobalValue *gv, std::string name, uint8_t sect, GVName = TAI->getPrivateGlobalPrefix() + name; break; case GlobalValue::LinkerPrivateLinkage: - GVName = TAI->getLessPrivateGlobalPrefix() + name; + GVName = TAI->getLinkerPrivateGlobalPrefix() + name; break; case GlobalValue::InternalLinkage: GVName = TAI->getGlobalPrefix() + name; diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index 6540edd97a..31c29a72bd 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -57,7 +57,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) // Syntax: GlobalPrefix = "_"; PrivateGlobalPrefix = "L"; - LessPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata + LinkerPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata NeedsSet = true; NeedsIndirectEncoding = true; AllowQuotesInName = true; @@ -105,17 +105,18 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) } /// emitUsedDirectiveFor - On Darwin, internally linked data beginning with -/// the PrivateGlobalPrefix or the LessPrivateGlobalPrefix does not have the +/// the PrivateGlobalPrefix or the LinkerPrivateGlobalPrefix does not have the /// directive emitted (this occurs in ObjC metadata). bool DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV, Mangler *Mang) const { if (!GV) return false; - // Check whether the mangled name has the "Private" or "LessPrivate" prefix. + // Check whether the mangled name has the "Private" or "LinkerPrivate" prefix. if (GV->hasLocalLinkage() && !isa<Function>(GV)) { const std::string &Name = Mang->getMangledName(GV); + // FIXME: Always "L" and "l", simplify! const char *PGPrefix = getPrivateGlobalPrefix(); - const char *LPGPrefix = getLessPrivateGlobalPrefix(); + const char *LPGPrefix = getLinkerPrivateGlobalPrefix(); unsigned PGPLen = strlen(PGPrefix); unsigned LPGPLen = strlen(LPGPrefix); diff --git a/lib/Target/MSP430/MSP430AsmPrinter.cpp b/lib/Target/MSP430/MSP430AsmPrinter.cpp index 6cc5dedc15..f6da3f3019 100644 --- a/lib/Target/MSP430/MSP430AsmPrinter.cpp +++ b/lib/Target/MSP430/MSP430AsmPrinter.cpp @@ -82,7 +82,7 @@ FunctionPass *llvm::createMSP430CodePrinterPass(formatted_raw_ostream &o, bool MSP430AsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); return false; // success } diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp index ba7fd4c62c..383ba8f014 100644 --- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp @@ -452,7 +452,7 @@ bool MipsAsmPrinter:: doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); // Tell the assembler which ABI we are using O << "\t.section .mdebug." << emitCurrentABIString() << '\n'; diff --git a/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp b/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp index 71394e8ad7..7710819405 100644 --- a/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp @@ -224,7 +224,7 @@ void SparcAsmPrinter::printCCOperand(const MachineInstr *MI, int opNum) { bool SparcAsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); return false; // success } diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp index 7b0989fce3..f4f181c307 100644 --- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp +++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp @@ -93,7 +93,7 @@ FunctionPass *llvm::createSystemZCodePrinterPass(formatted_raw_ostream &o, bool SystemZAsmPrinter::doInitialization(Module &M) { Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(), - TAI->getLessPrivateGlobalPrefix()); + TAI->getLinkerPrivateGlobalPrefix()); return false; // success } diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index fc8d58abfc..2a2e987667 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -49,7 +49,7 @@ TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm) MaxOperandLength = 0; GlobalPrefix = ""; PrivateGlobalPrefix = "."; - LessPrivateGlobalPrefix = ""; + LinkerPrivateGlobalPrefix = ""; JumpTableSpecialLabelPrefix = 0; GlobalVarAddrPrefix = ""; GlobalVarAddrSuffix = ""; |