diff options
author | Andrew Lenharth <alenhar2@cs.uiuc.edu> | 2007-08-22 19:33:11 +0000 |
---|---|---|
committer | Andrew Lenharth <alenhar2@cs.uiuc.edu> | 2007-08-22 19:33:11 +0000 |
commit | 61d35f5f357074af0ec3cdc2f96362a401cc3ee0 (patch) | |
tree | 829d2dfde966f90225865e1fd3a032f4137d64a8 /lib | |
parent | fc6c82e8fe6f8c80ca212be3a0d0d6c6637d786f (diff) | |
download | external_llvm-61d35f5f357074af0ec3cdc2f96362a401cc3ee0.tar.gz external_llvm-61d35f5f357074af0ec3cdc2f96362a401cc3ee0.tar.bz2 external_llvm-61d35f5f357074af0ec3cdc2f96362a401cc3ee0.zip |
move this check. ppc outputs .no_dead_strip properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 4cda0dd3b5..9387847cff 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -314,6 +314,12 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, /// special global used by LLVM. If so, emit it and return true, otherwise /// do nothing and return false. bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { + if (GV->getName() == "llvm.used") { + if (TAI->getUsedDirective() != 0) // No need to emit this at all. + EmitLLVMUsedList(GV->getInitializer()); + return true; + } + // Ignore debug and non-emitted data. if (GV->getSection() == "llvm.metadata") return true; @@ -321,12 +327,6 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { assert(GV->hasInitializer() && "Not a special LLVM global!"); - if (GV->getName() == "llvm.used") { - if (TAI->getUsedDirective() != 0) // No need to emit this at all. - EmitLLVMUsedList(GV->getInitializer()); - return true; - } - const TargetData *TD = TM.getTargetData(); unsigned Align = Log2_32(TD->getPointerPrefAlignment()); if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) { |