diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-21 18:38:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-21 18:38:57 +0000 |
commit | ae9822178ceb757bb0778146cf899bd715382f4f (patch) | |
tree | d754be08833dd4af5a831902a23617737d4b98aa /lib/Target/SystemZ | |
parent | b528d7627c5aa90478e8ae756fabc1d2a61f79d9 (diff) | |
download | external_llvm-ae9822178ceb757bb0778146cf899bd715382f4f.zip external_llvm-ae9822178ceb757bb0778146cf899bd715382f4f.tar.gz external_llvm-ae9822178ceb757bb0778146cf899bd715382f4f.tar.bz2 |
make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ')
-rw-r--r-- | lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp index eed46c3..ae449be 100644 --- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp +++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp @@ -67,8 +67,7 @@ namespace { void emitFunctionHeader(const MachineFunction &MF); bool runOnMachineFunction(MachineFunction &F); - bool doFinalization(Module &M); - void printModuleLevelGV(const GlobalVariable* GVar); + void PrintGlobalVariable(const GlobalVariable* GVar); void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); @@ -90,15 +89,6 @@ FunctionPass *llvm::createSystemZCodePrinterPass(formatted_raw_ostream &o, return new SystemZAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); } -bool SystemZAsmPrinter::doFinalization(Module &M) { - // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) - printModuleLevelGV(I); - - return AsmPrinter::doFinalization(M); -} - void SystemZAsmPrinter::emitFunctionHeader(const MachineFunction &MF) { unsigned FnAlign = MF.getAlignment(); const Function *F = MF.getFunction(); @@ -331,7 +321,7 @@ static void PrintUnmangledNameSafely(const Value *V, formatted_raw_ostream &OS) OS << *Name; } -void SystemZAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { +void SystemZAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { const TargetData *TD = TM.getTargetData(); if (!GVar->hasInitializer()) |