summaryrefslogtreecommitdiffstats
path: root/test/Verifier
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-12-16 19:16:29 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-12-16 19:16:29 +0000
commitce07e0234851022130bc66af040bc22f21ea473f (patch)
treef6c01046ce19a867d22e469be7c425a951aadcb1 /test/Verifier
parent4bdcc320cf8145f70fb2b85d2740662069f1b1a8 (diff)
Strip invalid TBAA when reading bitcode
This ensures backward compatibility on bitcode loading. Differential Revision: https://reviews.llvm.org/D27839 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r--test/Verifier/tbaa.ll8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Verifier/tbaa.ll b/test/Verifier/tbaa.ll
index 6c6b9d1c53d9..23ed8604dacb 100644
--- a/test/Verifier/tbaa.ll
+++ b/test/Verifier/tbaa.ll
@@ -1,5 +1,9 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; RUN: llvm-as -disable-verify < %s 2>&1 | opt -verify -S | FileCheck %s --check-prefix=STRIP
+; STRIP-NOT: tbaa
+; STRIP: @f_0
+; STRIP: Do no strip this
define void @f_0(i32* %ptr) {
; This part checks for the easy syntactic verifier rules.
@@ -34,10 +38,10 @@ define void @f_0(i32* %ptr) {
store i32 4, i32* %ptr, !tbaa !{!3, null, !"40", i64 0}
store i32 5, i32* %ptr, !tbaa !{!3, !3, !"40", i64 0}
store i32 6, i32* %ptr, !tbaa !{!3, !2, i32 40, i64 0}
- store i32 7, i32* %ptr, !tbaa !{!3, !12, i32 40, i64 0}
+ store i32 7, i32* %ptr, !tbaa !{!3, !12, i32 40, i64 0}, !metadata !42
ret void
}
-
+!42 = !{!"Do no strip this!"}
define void @f_1(i32* %ptr) {
; This part checks for more semantic verifier rules.