[PATCH] Test varargs intrinsic support.

Andrew Trick atrick at apple.com
Mon Oct 21 20:14:22 PDT 2013


Hi lhames, ributzka, echristo,

This makes use of the new stackmap intrinsics to test varargs support.

http://llvm-reviews.chandlerc.com/D1994

Files:
  test/Verifier/varargs-intrinsic.ll

Index: test/Verifier/varargs-intrinsic.ll
===================================================================
--- /dev/null
+++ 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
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1994.1.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131021/b7bcff94/attachment.bin>


More information about the llvm-commits mailing list