summaryrefslogtreecommitdiff
path: root/test/Bitcode
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2013-12-08 11:35:09 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2013-12-08 11:35:09 +0000
commit7dba1260ea8375a97b7a5c2805a4328dd7c768cf (patch)
tree04827126448cba8e57c94ce0ac67c625f8def38a /test/Bitcode
parent3f8ce09441e8221608b2afcfffa1acb907fab836 (diff)
downloadllvm-7dba1260ea8375a97b7a5c2805a4328dd7c768cf.tar.gz
llvm-7dba1260ea8375a97b7a5c2805a4328dd7c768cf.tar.bz2
llvm-7dba1260ea8375a97b7a5c2805a4328dd7c768cf.tar.xz
Ensure bitcode encoding of visibility styles stays stable. Patch by Boaz Ouriel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode')
-rw-r--r--test/Bitcode/visibility-styles.3.2.ll23
-rw-r--r--test/Bitcode/visibility-styles.3.2.ll.bcbin0 -> 372 bytes
2 files changed, 23 insertions, 0 deletions
diff --git a/test/Bitcode/visibility-styles.3.2.ll b/test/Bitcode/visibility-styles.3.2.ll
new file mode 100644
index 0000000000..019b0ef8dd
--- /dev/null
+++ b/test/Bitcode/visibility-styles.3.2.ll
@@ -0,0 +1,23 @@
+; RUN: llvm-dis < %s.bc| FileCheck %s
+
+; visibility-styles.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
+; The test checks that LLVM does not silently misread visibility styles of
+; older bitcode files.
+
+@default.var = default global i32 0
+; CHECK: @default.var = global i32 0
+
+@hidden.var = hidden global i32 0
+; CHECK: @hidden.var = hidden global i32 0
+
+@protected.var = protected global i32 0
+; CHECK: @protected.var = protected global i32 0
+
+declare default void @default()
+; CHECK: declare void @default
+
+declare hidden void @hidden()
+; CHECK: declare hidden void @hidden
+
+declare protected void @protected()
+; CHECK: declare protected void @protected
diff --git a/test/Bitcode/visibility-styles.3.2.ll.bc b/test/Bitcode/visibility-styles.3.2.ll.bc
new file mode 100644
index 0000000000..e2f0b058cc
--- /dev/null
+++ b/test/Bitcode/visibility-styles.3.2.ll.bc
Binary files differ