[LLVMdev] Assertion in Function.cpp when linking modules
Ralf Karrenberg
Chareos at gmx.de
Wed Jul 22 07:13:30 PDT 2009
Hi everybody
I am having a hard time figuring out the following problem:
I am porting a library that uses LLVM 2.5 from Linux to Windows (LLVM compiled with cmake/MSVC, llvm-g++ pre-built binaries).
Compilation works fine, but at runtime, I encounter the following assertion:
Assertion failed: FunctionType::isValidReturnType(getReturnType()) && !isa<OpaqueType>(getReturnType
()) && "invalid return type", file .\Function.cpp, line 164
This happens somewhere in "LinkInModule" when trying to link two loaded .bc-files (generated by llvm-g++).
The weird point:
The assertion fires because the comparison RetTy == Type::VoidTy in isValidReturnType() fails although the TypeID is 0, the printed type is "void" and the function actually *does* return void.
This does not make any sense to me :(.
Any ideas on how to proceed?
Regards,
Ralf
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the llvm-dev
mailing list