summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-03-14 00:00:49 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-03-14 00:00:49 +0000
commitc9f277f754f3f2a805a077c7b53ef8216e598ec9 (patch)
treee156dc946ba320c3b4fb344b2e6b528d8272e2ad /llvm/test/Transforms
parent5c9c706ab27e36ef77dee13a571cc949edec2ee6 (diff)
downloadbcm5719-llvm-c9f277f754f3f2a805a077c7b53ef8216e598ec9.tar.gz
bcm5719-llvm-c9f277f754f3f2a805a077c7b53ef8216e598ec9.zip
LowerBitSets: Do not export symbols for bit set referenced globals on Darwin.
The linker on that platform may re-order symbols or strip dead symbols, which will break bit set checks. Avoid this by hiding the symbols from the linker. llvm-svn: 232235
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/LowerBitSets/simple.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LowerBitSets/simple.ll b/llvm/test/Transforms/LowerBitSets/simple.ll
index 7a7808b86ed..b3b7eb38aea 100644
--- a/llvm/test/Transforms/LowerBitSets/simple.ll
+++ b/llvm/test/Transforms/LowerBitSets/simple.ll
@@ -1,4 +1,5 @@
; RUN: opt -S -lowerbitsets < %s | FileCheck %s
+; RUN: opt -S -lowerbitsets -mtriple=x86_64-apple-macosx10.8.0 < %s | FileCheck -check-prefix=CHECK-DARWIN %s
; RUN: opt -S -O3 < %s | FileCheck -check-prefix=CHECK-NODISCARD %s
target datalayout = "e-p:32:32"
@@ -41,6 +42,10 @@ target datalayout = "e-p:32:32"
; CHECK: @b = alias getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 2)
; CHECK: @c = alias getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 4)
; CHECK: @d = alias getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 6)
+; CHECK-DARWIN: @a = private alias
+; CHECK-DARWIN: @b = private alias
+; CHECK-DARWIN: @c = private alias
+; CHECK-DARWIN: @d = private alias
; CHECK: @bits = private alias getelementptr inbounds ([68 x i8], [68 x i8]* [[BA]], i32 0, i32 0)
; CHECK: @bits1 = private alias getelementptr inbounds ([68 x i8], [68 x i8]* [[BA]], i32 0, i32 0)
OpenPOWER on IntegriCloud