search for: isvalidreturntyp

Displaying 4 results from an estimated 4 matches for "isvalidreturntyp".

Did you mean: isvalidreturntype
2009 Jul 22
0
[LLVMdev] Assertion in Function.cpp when linking modules
...dy 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...
2013 Mar 06
0
[LLVMdev] LangRef/implementation inconsistency: What is the intended constraint on function return types?
...a function type is a first class type or a void type." <http://llvm.org/docs/LangRef.html#id14> and also, contrarily, "<returntype>‘ is any type except label." <http://llvm.org/docs/LangRef.html#id15> On the other hand, the actual implementation of FunctionType::isValidReturnType opines that: bool FunctionType::isValidReturnType(Type *RetTy) { return !RetTy->isFunctionTy() && !RetTy->isLabelTy() && !RetTy->isMetadataTy(); } These definitions are mutually incompatible. What is the intended definition? -- Sean Silva
2013 Dec 04
0
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
...!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector<Type*> ParamTypes; for (unsigned i = 0, e = ArgList.size(); i != e; ++i) ParamTypes.push_back(ArgList[i].V->getType()); if (!FunctionType::isValidReturnType(RetType)) return Error(RetTypeLoc, "Invalid result type for LLVM function"); Ty = FunctionType::get(RetType, ParamTypes, false); PFTy = PointerType::getUnqual(Ty); } -- Sean Silva > > > -- Mikael > > > 2013/12/4 Eli Bendersky <eliben at google.co...
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
Whoops... Seems I forgot the asterisk (*) after the cast. Or something. Because I did insert the cast and it didn't work. But NOW it works. Thank you for spending some time on this - and also for presenting the solution. -- Mikael 2013/12/4 Eli Bendersky <eliben at google.com> > This code: > > declare i32 @printf(i8* nocapture readonly, ...) nounwind > > define