diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-09 06:14:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-09 06:14:35 +0000 |
commit | e363fdf318fb59d0dda49ad7cb39367d19e034c7 (patch) | |
tree | bd96dca6059a39ee47731b5c78fc55f51f573a62 /llvm/lib/Target | |
parent | 6b7847a5bc2f515dee00b2438b6267bb3fea24fd (diff) | |
download | bcm5719-llvm-e363fdf318fb59d0dda49ad7cb39367d19e034c7.tar.gz bcm5719-llvm-e363fdf318fb59d0dda49ad7cb39367d19e034c7.zip |
Add support for 'special' llvm globals like debug info and static ctors/dtors.
llvm-svn: 26628
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/IA64/IA64AsmPrinter.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp index ad42ca3cd1e..6f45fb5497f 100644 --- a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp +++ b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp @@ -231,6 +231,10 @@ bool AlphaAsmPrinter::doFinalization(Module &M) { for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) if (I->hasInitializer()) { // External global require no code + // Check to see if this is a special global used by LLVM, if so, emit it. + if (EmitSpecialLLVMGlobal(I)) + continue; + O << "\n\n"; std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); diff --git a/llvm/lib/Target/IA64/IA64AsmPrinter.cpp b/llvm/lib/Target/IA64/IA64AsmPrinter.cpp index d779104701c..09d388b8498 100644 --- a/llvm/lib/Target/IA64/IA64AsmPrinter.cpp +++ b/llvm/lib/Target/IA64/IA64AsmPrinter.cpp @@ -288,6 +288,10 @@ bool IA64AsmPrinter::doFinalization(Module &M) { for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) if (I->hasInitializer()) { // External global require no code + // Check to see if this is a special global used by LLVM, if so, emit it. + if (EmitSpecialLLVMGlobal(I)) + continue; + O << "\n\n"; std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); diff --git a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp index 3be81a55ce8..4565a997e27 100644 --- a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -239,8 +239,13 @@ bool SparcAsmPrinter::doFinalization(Module &M) { const TargetData &TD = TM.getTargetData(); // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) + for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) if (I->hasInitializer()) { // External global require no code + // Check to see if this is a special global used by LLVM, if so, emit it. + if (EmitSpecialLLVMGlobal(I)) + continue; + O << "\n\n"; std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); |