diff options
author | Edwin Török <edwintorok@gmail.com> | 2009-05-22 06:41:43 +0000 |
---|---|---|
committer | Edwin Török <edwintorok@gmail.com> | 2009-05-22 06:41:43 +0000 |
commit | a12c6a01d7b0dda0c13edc54e295a73b4bc8f0a5 (patch) | |
tree | 8a078c880c88e5a08dc99cb8904b6df94a927b00 /test/Verifier | |
parent | ed2d10bf4a93e0f7e05bc782e5291cfa707f6b80 (diff) | |
download | external_llvm-a12c6a01d7b0dda0c13edc54e295a73b4bc8f0a5.zip external_llvm-a12c6a01d7b0dda0c13edc54e295a73b4bc8f0a5.tar.gz external_llvm-a12c6a01d7b0dda0c13edc54e295a73b4bc8f0a5.tar.bz2 |
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.ll | 11 |
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 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 +} |