Ensure bitcode encoding of visibility styles stays stable. Patch by Boaz Ouriel.
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 8 Dec 2013 11:35:09 +0000 (11:35 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 8 Dec 2013 11:35:09 +0000 (11:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196718 91177308-0d34-0410-b5e6-96231b3b80d8

test/Bitcode/visibility-styles.3.2.ll [new file with mode: 0644]
test/Bitcode/visibility-styles.3.2.ll.bc [new file with mode: 0644]

diff --git a/test/Bitcode/visibility-styles.3.2.ll b/test/Bitcode/visibility-styles.3.2.ll
new file mode 100644 (file)
index 0000000..019b0ef
--- /dev/null
@@ -0,0 +1,23 @@
+; RUN:  llvm-dis < %s.bc| FileCheck %s\r
+\r
+; visibility-styles.3.2.ll.bc was generated by passing this file to llvm-as-3.2.\r
+; The test checks that LLVM does not silently misread visibility styles of\r
+; older bitcode files.\r
+\r
+@default.var = default global i32 0\r
+; CHECK: @default.var = global i32 0\r
+\r
+@hidden.var = hidden global i32 0\r
+; CHECK: @hidden.var = hidden global i32 0\r
+\r
+@protected.var = protected global i32 0\r
+; CHECK: @protected.var = protected global i32 0\r
+\r
+declare default void @default()\r
+; CHECK: declare void @default\r
+\r
+declare hidden void @hidden()\r
+; CHECK: declare hidden void @hidden\r
+\r
+declare protected void @protected()\r
+; CHECK: declare protected void @protected\r
diff --git a/test/Bitcode/visibility-styles.3.2.ll.bc b/test/Bitcode/visibility-styles.3.2.ll.bc
new file mode 100644 (file)
index 0000000..e2f0b05
Binary files /dev/null and b/test/Bitcode/visibility-styles.3.2.ll.bc differ