From 892ac21f067586300ab049b4d34d22149ff1274c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 12 Mar 2010 20:43:52 +0000 Subject: make DecorateCygMingName a static method. llvm-svn: 98377 --- llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 7 +++---- llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 7 +++---- llvm/lib/Target/X86/X86COFFMachineModuleInfo.h | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index cc80e20fb1c..517d3366c5c 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp @@ -59,10 +59,9 @@ MCSymbol *X86AsmPrinter::GetGlobalValueSymbol(const GlobalValue *GV) const { if (!Subtarget->isTargetCygMing() || !isa(GV)) return Symb; - X86COFFMachineModuleInfo &COFFMMI = - MMI->getObjFileInfo(); - return COFFMMI.DecorateCygMingName(Symb, OutContext, cast(GV), - *TM.getTargetData()); + return X86COFFMachineModuleInfo:: + DecorateCygMingName(Symb, OutContext, cast(GV), + *TM.getTargetData()); } /// runOnMachineFunction - Emit the function body. diff --git a/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index 537d44222f0..7b8c479c5b9 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp @@ -63,10 +63,9 @@ GetSymbolFromOperand(const MachineOperand &MO) const { isa(MO.getGlobal())) { const GlobalValue *GV = MO.getGlobal(); MCSymbol *Sym = Mang->getSymbol(GV); - X86COFFMachineModuleInfo &COFFMMI = - AsmPrinter.MMI->getObjFileInfo(); - Sym = COFFMMI.DecorateCygMingName(Sym, Ctx, cast(GV), - *AsmPrinter.TM.getTargetData()); + Sym = X86COFFMachineModuleInfo:: + DecorateCygMingName(Sym, Ctx, cast(GV), + *AsmPrinter.TM.getTargetData()); Name.append(Sym->getName().begin(), Sym->getName().end()); } else { const GlobalValue *GV = MO.getGlobal(); diff --git a/llvm/lib/Target/X86/X86COFFMachineModuleInfo.h b/llvm/lib/Target/X86/X86COFFMachineModuleInfo.h index d07f0733535..27f82874ee7 100644 --- a/llvm/lib/Target/X86/X86COFFMachineModuleInfo.h +++ b/llvm/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); -- cgit v1.2.3