aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit1e0e0d15d2749d27af05086f860cc2204f1f828e (patch)
tree831284f8410262eda3bfac6d33dfd150ad771249 /lib/CodeGen/MachineModuleInfo.cpp
parentf83cbf4ae12625b98ef5e9cf6d889fe980936374 (diff)
downloadexternal_llvm-1e0e0d15d2749d27af05086f860cc2204f1f828e.tar.gz
external_llvm-1e0e0d15d2749d27af05086f860cc2204f1f828e.tar.bz2
external_llvm-1e0e0d15d2749d27af05086f860cc2204f1f828e.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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 66dd8375eb..20b819e823 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/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;