aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/GlobalOpt/hidden.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/GlobalOpt/hidden.ll')
-rw-r--r--test/Transforms/GlobalOpt/hidden.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/hidden.ll b/test/Transforms/GlobalOpt/hidden.ll
new file mode 100644
index 0000000..301e158
--- /dev/null
+++ b/test/Transforms/GlobalOpt/hidden.ll
@@ -0,0 +1,14 @@
+; RUN: opt %s -globalopt -S | FileCheck %s
+
+@foo = linkonce_odr unnamed_addr constant i32 42
+; CHECK: @foo = linkonce_odr hidden unnamed_addr constant i32 42
+
+define linkonce_odr void @bar() unnamed_addr {
+; CHECK: define linkonce_odr hidden void @bar() unnamed_addr {
+ ret void
+}
+
+define i32* @zed() {
+ call void @bar()
+ ret i32* @foo
+}