[LLVMdev] Equivalent types

Andrii Vasyliev andrii.vasyliev at gmail.com
Sun Sep 6 16:32:44 PDT 2009


I have this error while building my code:
Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i)
== Params[i]->getType()) && "Calling a function with a bad
Actually I'm trying to load functions from .bc file and use them in
the code that I'm building with IRBuilder.

I found that function parameter type is %struct.reValue* and
the type of the value that I'm passing to the function is {i32,i64}*

But these types are quite equivalent, because of the definition:
        %struct.reValue = type { %"struct.reValue::$_44",
%"struct.reValue::$_46" }
        %"struct.reValue::$_44" = type { i32 }
        %"struct.reValue::$_46" = type { i64 }

What is the easiest way to solve this problem?


More information about the llvm-dev mailing list