llvm/test/Assembler/missing-tbaa.ll
Duncan P. N. Exon Smith 13d5c58951 AsmParser: Don't crash on unresolved !tbaa
Instead of crashing, give a nice error.  As a drive-by, fix the location
associated with the errors for unresolved metadata (the location was off
by one token).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265507 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 02:06:40 +00:00

12 lines
285 B
LLVM

; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; Check that !tbaa upgrade doesn't crash on undefined metadata (it should give
; an error).
define void @foo() {
entry:
store i8 undef, i8* undef,
; CHECK: :[[@LINE+1]]:10: error: use of undefined metadata '!1'
!tbaa !1
unreachable
}