summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2007-08-22 19:33:11 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2007-08-22 19:33:11 +0000
commitbeb80a98327b14feb072fe40f47f34fa7db99d3b (patch)
tree11e59568c6978052dbb9373b45717328e282c198 /llvm/lib/CodeGen
parent862afea91e8e5ff21f7ae998e80b7d85935fc15c (diff)
downloadbcm5719-llvm-beb80a98327b14feb072fe40f47f34fa7db99d3b.tar.gz
bcm5719-llvm-beb80a98327b14feb072fe40f47f34fa7db99d3b.zip
move this check. ppc outputs .no_dead_strip properly
llvm-svn: 41286
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 4cda0dd3b56..9387847cff6 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/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()) {
OpenPOWER on IntegriCloud