summaryrefslogtreecommitdiffstats
path: root/llvm/test
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
commit8662305bae83768a73057cd9f9e3b93df8c3a037 (patch)
tree1654c758f89c04039f510dfdeffdcf8cdf1f9da5 /llvm/test
parentc66e7e3b8c3baa213864259505790aeb726429ee (diff)
downloadbcm5719-llvm-8662305bae83768a73057cd9f9e3b93df8c3a037.tar.gz
bcm5719-llvm-8662305bae83768a73057cd9f9e3b93df8c3a037.zip
Strip invalid TBAA when reading bitcode
This ensures backward compatibility on bitcode loading. Differential Revision: https://reviews.llvm.org/D27839 llvm-svn: 289977
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Verifier/tbaa.ll8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/test/Verifier/tbaa.ll b/llvm/test/Verifier/tbaa.ll
index 6c6b9d1c53d..23ed8604dac 100644
--- a/llvm/test/Verifier/tbaa.ll
+++ b/llvm/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.
OpenPOWER on IntegriCloud