search for: getorinsertfunt

Displaying 3 results from an estimated 3 matches for "getorinsertfunt".

Did you mean: getorinsertfunc
2013 Apr 10
0
[LLVMdev] Can't create "main" function?
Got it. I had a global_variable also with the name "main". Perhaps getOrInsertFuntion needs an assert to check this (it was returning a variable I guess rather than a function, and thus static_cast was broken). On 10/04/13 20:15, edA-qa mort-ora-y wrote: > I'm getting a strange behaviour when I attempt to create my main function: > > > auto func = static_cast&l...
2013 Apr 10
2
[LLVMdev] Can't create "main" function?
I'm getting a strange behaviour when I attempt to create my main function: auto func = static_cast<llvm::Function*>(module->getOrInsertFunction( "main", types->type_void(), (llvm::Type*)0 ) ); ASSERT( func ); auto block = llvm::BasicBlock::Create( *context, "entry", func ); The "BasicBlock::Create" function is causing a segfault. This only happens
2013 Apr 11
1
[LLVMdev] Can't create "main" function?
Hi, On 10/04/13 20:23, edA-qa mort-ora-y wrote: > Got it. I had a global_variable also with the name "main". Perhaps > getOrInsertFuntion needs an assert to check this (it was returning a > variable I guess rather than a function, and thus static_cast was broken). if you use LLVM's cast rather than static_cast then you will get an assertion failure if the cast is wrong. Ciao, Duncan. > > On 10/04/13 20:15, edA-qa m...