From 3f185a72cd558ad8836ebd6f779f032c97835c03 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 12 Mar 2010 20:43:52 +0000 Subject: [PATCH 1/1] make DecorateCygMingName a static method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98377 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 7 +++---- lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 7 +++---- lib/Target/X86/X86COFFMachineModuleInfo.h | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index cc80e20fb1c..517d3366c5c 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(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/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index 537d44222f0..7b8c479c5b9 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(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/lib/Target/X86/X86COFFMachineModuleInfo.h b/lib/Target/X86/X86COFFMachineModuleInfo.h index d07f0733535..27f82874ee7 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); -- 2.34.1