mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Move getSymbol to TargetLoweringObjectFile.
This allows constructing a Mangler with just a TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -111,7 +111,7 @@ void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName,
|
||||
StringRef Name = GVName.toStringRef(TmpData);
|
||||
assert(!Name.empty() && "getNameWithPrefix requires non-empty name");
|
||||
|
||||
const MCAsmInfo *MAI = Context.getAsmInfo();
|
||||
const MCAsmInfo *MAI = TM->getMCAsmInfo();
|
||||
|
||||
// If the global name is not led with \1, add the appropriate prefixes.
|
||||
if (Name[0] == '\1') {
|
||||
@@ -212,7 +212,7 @@ void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName,
|
||||
|
||||
// If we are supposed to add a microsoft-style suffix for stdcall/fastcall,
|
||||
// add it.
|
||||
if (Context.getAsmInfo()->hasMicrosoftFastStdCallMangling()) {
|
||||
if (TM->getMCAsmInfo()->hasMicrosoftFastStdCallMangling()) {
|
||||
if (const Function *F = dyn_cast<Function>(GV)) {
|
||||
CallingConv::ID CC = F->getCallingConv();
|
||||
|
||||
@@ -236,13 +236,3 @@ void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// getSymbol - Return the MCSymbol for the specified global value. This
|
||||
/// symbol is the main label that is the address of the global.
|
||||
MCSymbol *Mangler::getSymbol(const GlobalValue *GV) {
|
||||
SmallString<60> NameStr;
|
||||
getNameWithPrefix(NameStr, GV, false);
|
||||
return Context.GetOrCreateSymbol(NameStr.str());
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user