summaryrefslogtreecommitdiffstats
path: root/test/Verifier
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-10-31 17:18:17 +0000
committerAndrew Trick <atrick@apple.com>2013-10-31 17:18:17 +0000
commit233012c25bb3b738e0a994bf0678d016fb2a8766 (patch)
treef63f6b469b9ca6cd9ca01aef12bed0589cc09f04 /test/Verifier
parentab7431b0d47926e804a4a07fdca12e575c976daf (diff)
downloadexternal_llvm-233012c25bb3b738e0a994bf0678d016fb2a8766.zip
external_llvm-233012c25bb3b738e0a994bf0678d016fb2a8766.tar.gz
external_llvm-233012c25bb3b738e0a994bf0678d016fb2a8766.tar.bz2
Add Verifier test case for variable argument intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r--test/Verifier/varargs-intrinsic.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Verifier/varargs-intrinsic.ll b/test/Verifier/varargs-intrinsic.ll
new file mode 100644
index 0000000..f6d0a70
--- /dev/null
+++ b/test/Verifier/varargs-intrinsic.ll
@@ -0,0 +1,16 @@
+; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
+
+declare void @llvm.experimental.stackmap(i32, i32)
+declare void @llvm.donothing(...)
+
+define void @foo1() {
+ call void @llvm.experimental.stackmap(i32 0, i32 12)
+; CHECK: Callsite was not defined with variable arguments!
+ ret void
+}
+
+define void @foo2() {
+ call void (...)* @llvm.donothing(i32 0, i64 1)
+; CHECK: Intrinsic was not defined with variable arguments!
+ ret void
+}