diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-20 06:14:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-20 06:14:25 +0000 |
commit | 58f9bb2ccda769adbdc5a71e1e8d22465d976771 (patch) | |
tree | 428a09195a1f2747ada07c264b68fa7983544fae /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 4e4eb0b00c0ce6eae1cd832c031313a4696b590c (diff) | |
download | bcm5719-llvm-58f9bb2ccda769adbdc5a71e1e8d22465d976771.tar.gz bcm5719-llvm-58f9bb2ccda769adbdc5a71e1e8d22465d976771.zip |
implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin.
llvm-svn: 76399
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index a2d154f1ee6..80bdf04e8e8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -466,13 +466,13 @@ void AsmPrinter::printPICJumpTableEntry(const 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 (GV->isName("llvm.used")) { if (TAI->getUsedDirective() != 0) // No need to emit this at all. EmitLLVMUsedList(GV->getInitializer()); return true; } - // Ignore debug and non-emitted data. + // Ignore debug and non-emitted data. This handles llvm.compiler.used. if (GV->getSection() == "llvm.metadata" || GV->hasAvailableExternallyLinkage()) return true; |