From 9107c546939d02455283214818359c17b3875051 Mon Sep 17 00:00:00 2001 From: Torok Edwin Date: Fri, 22 May 2009 06:41:43 +0000 Subject: 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 --- test/Verifier/2009-05-22-CC.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/Verifier/2009-05-22-CC.ll (limited to 'test/Verifier') diff --git a/test/Verifier/2009-05-22-CC.ll b/test/Verifier/2009-05-22-CC.ll new file mode 100644 index 0000000..7775ded --- /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 +} -- cgit v1.1