Displaying 3 results from an estimated 3 matches for "type_void".
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 if the function is called "main", any other function and it
works fine. Prior to this c...
2013 Apr 10
0
[LLVMdev] Can't create "main" 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<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 if the function is called "main", any other function and it
>...
2013 Apr 11
1
[LLVMdev] Can't create "main" function?
...an.
>
> 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<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 if the function is called "main", any other...