summaryrefslogtreecommitdiff
path: root/test/Verifier
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-05-22 06:41:43 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-05-22 06:41:43 +0000
commit9107c546939d02455283214818359c17b3875051 (patch)
tree8a078c880c88e5a08dc99cb8904b6df94a927b00 /test/Verifier
parentf7cca7b8f8c53a7ede05917fc603d29e133e1720 (diff)
Verify that calling conventions match function prototype.
This only rejects mismatches between target specific calling convention and C/LLVM specific calling convention. There are too many fastcc/C, coldcc/cc42 mismatches in the testsuite, these are not reject by the verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r--test/Verifier/2009-05-22-CC.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Verifier/2009-05-22-CC.ll b/test/Verifier/2009-05-22-CC.ll
new file mode 100644
index 00000000000..7775dede03a
--- /dev/null
+++ b/test/Verifier/2009-05-22-CC.ll
@@ -0,0 +1,11 @@
+; RUN: not llvm-as < %s |& grep {Calling convention does not match function signature}
+; PR 4239
+
+; Verify that the calling convention on the call instruction matches the
+; declared calling convention
+declare x86_stdcallcc i32 @re_string_construct(i8* inreg %pstr, i8* inreg %str, i32 inreg %len, i8* %trans, i32 %icase, i8* %dfa);
+define void @main() {
+entry:
+ %0 = call i32 (...)* bitcast (i32 (i8*, i8*, i32, i8*, i32, i8*)* @re_string_construct to i32 (...)*)(i32 inreg 0, i32 inreg 0, i32 inreg 0, i32 0, i32 0, i8* inttoptr (i32 673194176 to i8*))
+ ret void
+}