// Create the fib function and insert it into module M. This function is said
// to return an int and take an int parameter.
Function *FibF =
- cast<Function>(M->getOrInsertFunction("fib", Type::getInt32Ty(Context),
+ cast<Function>(M->getOrInsertFunction("fib", Type::getInt32Ty(Context),
Type::getInt32Ty(Context),
(Type *)0));
InitializeNativeTarget();
LLVMContext Context;
-
+
// Create some module to put our function into it.
OwningPtr<Module> M(new Module("test", Context));
// import result of execution
outs() << "Result: " << GV.IntVal << "\n";
-
+
return 0;
}