[LLVMdev] Function definition

nico listiges at arcor.de
Sun Aug 26 08:20:04 PDT 2007


Hi,

I want to define a function with basic block and so on.

I tried this:
....
Function *mmFn = new Function(FunctionType::get 
(Type::Int32Ty,Params,false), GlobalValue::ExternalLinkage,  
"___MM___", MainFn->getParent());
	
new BasicBlock("entry",mmFn);
...

At runtime I get a 'bus error'. Without the 'BasicBlock' it works a  
little bit. In the .ll code I can see the declaration of the function  
'___MM___' (but no definition).

I don't know what I forget to do. Perhaps somebody can help me ?

Thank you,
Nico



More information about the llvm-dev mailing list