summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler/missing-tbaa.ll
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-06 02:06:40 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-06 02:06:40 +0000
commit29883866a40279a1e8328b06f0b443493d06a95b (patch)
treeca47cff3aeb7b42ef03e9ca07652a752771a089b /llvm/test/Assembler/missing-tbaa.ll
parent2e5973ef74efb0c74815c4f5129cadcac2905b97 (diff)
downloadbcm5719-llvm-29883866a40279a1e8328b06f0b443493d06a95b.tar.gz
bcm5719-llvm-29883866a40279a1e8328b06f0b443493d06a95b.zip
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). llvm-svn: 265507
Diffstat (limited to 'llvm/test/Assembler/missing-tbaa.ll')
-rw-r--r--llvm/test/Assembler/missing-tbaa.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Assembler/missing-tbaa.ll b/llvm/test/Assembler/missing-tbaa.ll
new file mode 100644
index 00000000000..38fe754b603
--- /dev/null
+++ b/llvm/test/Assembler/missing-tbaa.ll
@@ -0,0 +1,11 @@
+; 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
+}
OpenPOWER on IntegriCloud