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 | 40bbebde9d250b875a47a688d0c6552834ada48f (patch) | |
tree | d754be08833dd4af5a831902a23617737d4b98aa /lib/CodeGen | |
parent | 4b938958bcc59586508bc9681e75c2e3f5164672 (diff) |
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/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 08eab53cf2..7b7a9a5a97 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -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(); |