aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-12 20:43:52 +0000
committerChris Lattner <sabre@nondot.org>2010-03-12 20:43:52 +0000
commit3f185a72cd558ad8836ebd6f779f032c97835c03 (patch)
tree3032071212251de64d0d32c13f6617965fe75978
parenta30b181c20710f0b3c511b7119c2d37859e0158d (diff)
make DecorateCygMingName a static method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98377 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp7
-rw-r--r--lib/Target/X86/AsmPrinter/X86MCInstLower.cpp7
-rw-r--r--lib/Target/X86/X86COFFMachineModuleInfo.h4
3 files changed, 8 insertions, 10 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
index cc80e20fb1..517d3366c5 100644
--- a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
@@ -59,10 +59,9 @@ MCSymbol *X86AsmPrinter::GetGlobalValueSymbol(const GlobalValue *GV) const {
if (!Subtarget->isTargetCygMing() || !isa<Function>(GV))
return Symb;
- X86COFFMachineModuleInfo &COFFMMI =
- MMI->getObjFileInfo<X86COFFMachineModuleInfo>();
- return COFFMMI.DecorateCygMingName(Symb, OutContext, cast<Function>(GV),
- *TM.getTargetData());
+ return X86COFFMachineModuleInfo::
+ DecorateCygMingName(Symb, OutContext, cast<Function>(GV),
+ *TM.getTargetData());
}
/// runOnMachineFunction - Emit the function body.
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
index 537d44222f..7b8c479c5b 100644
--- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
+++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
@@ -63,10 +63,9 @@ GetSymbolFromOperand(const MachineOperand &MO) const {
isa<Function>(MO.getGlobal())) {
const GlobalValue *GV = MO.getGlobal();
MCSymbol *Sym = Mang->getSymbol(GV);
- X86COFFMachineModuleInfo &COFFMMI =
- AsmPrinter.MMI->getObjFileInfo<X86COFFMachineModuleInfo>();
- Sym = COFFMMI.DecorateCygMingName(Sym, Ctx, cast<Function>(GV),
- *AsmPrinter.TM.getTargetData());
+ Sym = X86COFFMachineModuleInfo::
+ DecorateCygMingName(Sym, Ctx, cast<Function>(GV),
+ *AsmPrinter.TM.getTargetData());
Name.append(Sym->getName().begin(), Sym->getName().end());
} else {
const GlobalValue *GV = MO.getGlobal();
diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.h b/lib/Target/X86/X86COFFMachineModuleInfo.h
index d07f073353..27f82874ee 100644
--- a/lib/Target/X86/X86COFFMachineModuleInfo.h
+++ b/lib/Target/X86/X86COFFMachineModuleInfo.h
@@ -30,8 +30,8 @@ public:
X86COFFMachineModuleInfo(const MachineModuleInfo &) {}
virtual ~X86COFFMachineModuleInfo();
- MCSymbol *DecorateCygMingName(MCSymbol *Name, MCContext &Ctx,
- const Function *F, const TargetData &TD);
+ static MCSymbol *DecorateCygMingName(MCSymbol *Name, MCContext &Ctx,
+ const Function *F, const TargetData &TD);
void addExternalFunction(StringRef Name) {
CygMingStubs.insert(Name);