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 | 401e10c4fbfcdcfade5065093e2ca97f69a1d144 (patch) | |
tree | 831284f8410262eda3bfac6d33dfd150ad771249 /test | |
parent | ba8dc03935fadb05d4d68f9913543df22487f523 (diff) | |
download | external_llvm-401e10c4fbfcdcfade5065093e2ca97f69a1d144.zip external_llvm-401e10c4fbfcdcfade5065093e2ca97f69a1d144.tar.gz external_llvm-401e10c4fbfcdcfade5065093e2ca97f69a1d144.tar.bz2 |
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 'test')
-rw-r--r-- | test/CodeGen/X86/compiler_used.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/X86/compiler_used.ll b/test/CodeGen/X86/compiler_used.ll new file mode 100644 index 0000000..b67bc36 --- /dev/null +++ b/test/CodeGen/X86/compiler_used.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9 | grep no_dead_strip | count 1 +; We should have a .no_dead_strip directive for Z but not for X/Y. + +@X = internal global i8 4 +@Y = internal global i32 123 +@Z = internal global i8 4 + +@llvm.used = appending global [1 x i8*] [ i8* @Z ], section "llvm.metadata" +@llvm.compiler_used = appending global [2 x i8*] [ i8* @X, i8* bitcast (i32* @Y to i8*)], section "llvm.metadata" |