summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-20 06:14:25 +0000
committerChris Lattner <sabre@nondot.org>2009-07-20 06:14:25 +0000
commit58f9bb2ccda769adbdc5a71e1e8d22465d976771 (patch)
tree428a09195a1f2747ada07c264b68fa7983544fae /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent4e4eb0b00c0ce6eae1cd832c031313a4696b590c (diff)
downloadbcm5719-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/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 66dd8375eb5..20b819e8235 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -88,7 +88,8 @@ void MachineModuleInfo::EndFunction() {
/// AnalyzeModule - Scan the module for global debug information.
///
void MachineModuleInfo::AnalyzeModule(Module &M) {
- // Insert functions in the llvm.used array into UsedFunctions.
+ // Insert functions in the llvm.used array (but not llvm.compiler.used) into
+ // UsedFunctions.
GlobalVariable *GV = M.getGlobalVariable("llvm.used");
if (!GV || !GV->hasInitializer()) return;
OpenPOWER on IntegriCloud