Displaying 3 results from an estimated 3 matches for "d8e33af8".
2011 Mar 31
0
[LLVMdev] inserting exit function into IR
On Thu, Mar 31, 2011 at 9:31 PM, George Baah <georgebaah at gmail.com> wrote:
> Hi Joshua,
> I have a function foo and I want to insert exit(0) at the end of foo.
> The problem is M.getFunction returns null, which is understandable. I am not
> sure what to do. Below is the code snippet.
> void foo(int argc, char* argv[]) {
> printf("hello world\n");
>
2011 Mar 31
2
[LLVMdev] inserting exit function into IR
...xit(1);
> >
> > }
> >
> > Function *f = cast<Function>(temp);
> >
> > CallInst *ci = CallInst::Create(...)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110331/d8e33af8/attachment.html>
2011 Mar 31
3
[LLVMdev] inserting exit function into IR
Hi Joshua,
I have a function foo and I want to insert exit(0) at the end of foo.
The problem is M.getFunction returns null, which is understandable. I am not
sure what to do. Below is the code snippet.
void foo(int argc, char* argv[]) {
printf("hello world\n");
exit(0); //***I want to insert this exit
}
My llvm code snippet is
vector<const Type *> params =