make DecorateCygMingName a static method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-03-12 20:43:52 +00:00
parent a30b181c20
commit 3f185a72cd
3 changed files with 8 additions and 10 deletions

View File

@ -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.

View File

@ -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();

View File

@ -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);