From 8662305bae83768a73057cd9f9e3b93df8c3a037 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Fri, 16 Dec 2016 19:16:29 +0000 Subject: Strip invalid TBAA when reading bitcode This ensures backward compatibility on bitcode loading. Differential Revision: https://reviews.llvm.org/D27839 llvm-svn: 289977 --- llvm/test/Verifier/tbaa.ll | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'llvm/test') 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. -- cgit v1.2.3