[llvm-dev] Query regarding function signature mismatch
Arnab Das via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 22 20:05:30 PDT 2016
During the opt phase the following mismatch is spitted from the
verifier.cpp for the llvm-39
Fom the llvm-39 run
Call parameter type does not match function signature!
i8* getelementptr inbounds ([46 x i8], [46 x i8]* @instrname, i32 0, i32 0)
i8* %injectError = call i32 @myReferenceFunc(i32 %11, i8* getelementptr
inbounds ([46 x i8], [46 x i8]* @instrname, i32 0, i32 0), i32 -1)
As the snippet shows, it is issuing a function signature mismatch error.
Below is a corresponding snippet of a run from llvm-38 run
%injectError = call i32 @myReferenceFunc(i32 %4, i8* getelementptr inbounds
([45 x i8], [45 x i8]* @instrname, i32 0, i32 0), i32 -1)
In the llvm-39, it infers the return to be of type char pointer somehow
unlike in llvm-38.
The original function definition hasn't changed though.
We are using the current trunk of llvm.
Is there any related issue in the current trunk of llvm or if you could
point us to something that has changed in llvm-39 that might be causing
this difference ?
Note: For making our previous versions of passes compatible to llvm-39, we
have replaced all the calls of getGlobalContext() by
We did try out a separate version modifying the llvm code to introduce the
getGlobalContext() function as was available earlier to return the
*GlobalContext. Even with that we are seeing the same log.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev