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
This commit is contained in:
Chris Lattner
2009-07-21 18:38:57 +00:00
parent 4b938958bc
commit 40bbebde9d
18 changed files with 110 additions and 188 deletions

View File

@@ -196,6 +196,11 @@ bool AsmPrinter::doInitialization(Module &M) {
}
bool AsmPrinter::doFinalization(Module &M) {
// Emit global variables.
for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
I != E; ++I)
PrintGlobalVariable(I);
// Emit final debug information.
if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
DW->EndModule();