mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
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
This commit is contained in:
@@ -239,10 +239,10 @@ namespace llvm {
|
|||||||
/// have names in the .o file. This is often "." or "L".
|
/// have names in the .o file. This is often "." or "L".
|
||||||
const char *PrivateGlobalPrefix; // Defaults to "."
|
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
|
/// be passed through the assembler but be removed by the linker. This
|
||||||
/// is "l" on Darwin, currently used for some ObjC metadata.
|
/// 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
|
/// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
|
||||||
/// emitted before jump tables with the specified prefix.
|
/// emitted before jump tables with the specified prefix.
|
||||||
@@ -708,8 +708,8 @@ namespace llvm {
|
|||||||
const char *getPrivateGlobalPrefix() const {
|
const char *getPrivateGlobalPrefix() const {
|
||||||
return PrivateGlobalPrefix;
|
return PrivateGlobalPrefix;
|
||||||
}
|
}
|
||||||
const char *getLessPrivateGlobalPrefix() const {
|
const char *getLinkerPrivateGlobalPrefix() const {
|
||||||
return LessPrivateGlobalPrefix;
|
return LinkerPrivateGlobalPrefix;
|
||||||
}
|
}
|
||||||
const char *getJumpTableSpecialLabelPrefix() const {
|
const char *getJumpTableSpecialLabelPrefix() const {
|
||||||
return JumpTableSpecialLabelPrefix;
|
return JumpTableSpecialLabelPrefix;
|
||||||
|
@@ -155,7 +155,7 @@ void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||||||
|
|
||||||
bool AsmPrinter::doInitialization(Module &M) {
|
bool AsmPrinter::doInitialization(Module &M) {
|
||||||
Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix(),
|
Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix(),
|
||||||
TAI->getLessPrivateGlobalPrefix());
|
TAI->getLinkerPrivateGlobalPrefix());
|
||||||
|
|
||||||
if (TAI->doesAllowQuotesInName())
|
if (TAI->doesAllowQuotesInName())
|
||||||
Mang->setUseQuotes(true);
|
Mang->setUseQuotes(true);
|
||||||
|
@@ -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),
|
GV(gv), n_strx(0), n_type(sect == NO_SECT ? N_UNDF : N_SECT), n_sect(sect),
|
||||||
n_desc(0), n_value(0) {
|
n_desc(0), n_value(0) {
|
||||||
|
|
||||||
|
// FIXME: This is completely broken, it should use the mangler interface.
|
||||||
switch (GV->getLinkage()) {
|
switch (GV->getLinkage()) {
|
||||||
default:
|
default:
|
||||||
llvm_unreachable("Unexpected linkage type!");
|
llvm_unreachable("Unexpected linkage type!");
|
||||||
@@ -765,7 +766,7 @@ MachOSym::MachOSym(const GlobalValue *gv, std::string name, uint8_t sect,
|
|||||||
GVName = TAI->getPrivateGlobalPrefix() + name;
|
GVName = TAI->getPrivateGlobalPrefix() + name;
|
||||||
break;
|
break;
|
||||||
case GlobalValue::LinkerPrivateLinkage:
|
case GlobalValue::LinkerPrivateLinkage:
|
||||||
GVName = TAI->getLessPrivateGlobalPrefix() + name;
|
GVName = TAI->getLinkerPrivateGlobalPrefix() + name;
|
||||||
break;
|
break;
|
||||||
case GlobalValue::InternalLinkage:
|
case GlobalValue::InternalLinkage:
|
||||||
GVName = TAI->getGlobalPrefix() + name;
|
GVName = TAI->getGlobalPrefix() + name;
|
||||||
|
@@ -57,7 +57,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
|
|||||||
// Syntax:
|
// Syntax:
|
||||||
GlobalPrefix = "_";
|
GlobalPrefix = "_";
|
||||||
PrivateGlobalPrefix = "L";
|
PrivateGlobalPrefix = "L";
|
||||||
LessPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata
|
LinkerPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata
|
||||||
NeedsSet = true;
|
NeedsSet = true;
|
||||||
NeedsIndirectEncoding = true;
|
NeedsIndirectEncoding = true;
|
||||||
AllowQuotesInName = true;
|
AllowQuotesInName = true;
|
||||||
@@ -105,17 +105,18 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// emitUsedDirectiveFor - On Darwin, internally linked data beginning with
|
/// 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).
|
/// directive emitted (this occurs in ObjC metadata).
|
||||||
bool DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV,
|
bool DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV,
|
||||||
Mangler *Mang) const {
|
Mangler *Mang) const {
|
||||||
if (!GV) return false;
|
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)) {
|
if (GV->hasLocalLinkage() && !isa<Function>(GV)) {
|
||||||
const std::string &Name = Mang->getMangledName(GV);
|
const std::string &Name = Mang->getMangledName(GV);
|
||||||
|
// FIXME: Always "L" and "l", simplify!
|
||||||
const char *PGPrefix = getPrivateGlobalPrefix();
|
const char *PGPrefix = getPrivateGlobalPrefix();
|
||||||
const char *LPGPrefix = getLessPrivateGlobalPrefix();
|
const char *LPGPrefix = getLinkerPrivateGlobalPrefix();
|
||||||
unsigned PGPLen = strlen(PGPrefix);
|
unsigned PGPLen = strlen(PGPrefix);
|
||||||
unsigned LPGPLen = strlen(LPGPrefix);
|
unsigned LPGPLen = strlen(LPGPrefix);
|
||||||
|
|
||||||
|
@@ -82,7 +82,7 @@ FunctionPass *llvm::createMSP430CodePrinterPass(formatted_raw_ostream &o,
|
|||||||
|
|
||||||
bool MSP430AsmPrinter::doInitialization(Module &M) {
|
bool MSP430AsmPrinter::doInitialization(Module &M) {
|
||||||
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
||||||
TAI->getLessPrivateGlobalPrefix());
|
TAI->getLinkerPrivateGlobalPrefix());
|
||||||
return false; // success
|
return false; // success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -452,7 +452,7 @@ bool MipsAsmPrinter::
|
|||||||
doInitialization(Module &M)
|
doInitialization(Module &M)
|
||||||
{
|
{
|
||||||
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
||||||
TAI->getLessPrivateGlobalPrefix());
|
TAI->getLinkerPrivateGlobalPrefix());
|
||||||
|
|
||||||
// Tell the assembler which ABI we are using
|
// Tell the assembler which ABI we are using
|
||||||
O << "\t.section .mdebug." << emitCurrentABIString() << '\n';
|
O << "\t.section .mdebug." << emitCurrentABIString() << '\n';
|
||||||
|
@@ -224,7 +224,7 @@ void SparcAsmPrinter::printCCOperand(const MachineInstr *MI, int opNum) {
|
|||||||
|
|
||||||
bool SparcAsmPrinter::doInitialization(Module &M) {
|
bool SparcAsmPrinter::doInitialization(Module &M) {
|
||||||
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
||||||
TAI->getLessPrivateGlobalPrefix());
|
TAI->getLinkerPrivateGlobalPrefix());
|
||||||
return false; // success
|
return false; // success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -93,7 +93,7 @@ FunctionPass *llvm::createSystemZCodePrinterPass(formatted_raw_ostream &o,
|
|||||||
|
|
||||||
bool SystemZAsmPrinter::doInitialization(Module &M) {
|
bool SystemZAsmPrinter::doInitialization(Module &M) {
|
||||||
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
|
||||||
TAI->getLessPrivateGlobalPrefix());
|
TAI->getLinkerPrivateGlobalPrefix());
|
||||||
return false; // success
|
return false; // success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm)
|
|||||||
MaxOperandLength = 0;
|
MaxOperandLength = 0;
|
||||||
GlobalPrefix = "";
|
GlobalPrefix = "";
|
||||||
PrivateGlobalPrefix = ".";
|
PrivateGlobalPrefix = ".";
|
||||||
LessPrivateGlobalPrefix = "";
|
LinkerPrivateGlobalPrefix = "";
|
||||||
JumpTableSpecialLabelPrefix = 0;
|
JumpTableSpecialLabelPrefix = 0;
|
||||||
GlobalVarAddrPrefix = "";
|
GlobalVarAddrPrefix = "";
|
||||||
GlobalVarAddrSuffix = "";
|
GlobalVarAddrSuffix = "";
|
||||||
|
Reference in New Issue
Block a user