[LLVMdev] store the LLVM-bitcode from a pass

RAAD B raad_7007 at yahoo.com
Fri Mar 13 06:07:57 PDT 2009


Hi Duncan,

thanks for the answer. But    "opt  -load  ..../Decorator.so -dec <prog.bc> new_prog.bc"
creates an invalid file. When i use "lli", i get "lli: error loading program 'new_prog.bc': Invalid bitcode signature"

I have done the followings:
1) used "opt  -p -load  ..../Decorator.so -dec <prog.bc> new_prog.bc"
2) copied the output from the screen and created the file "new_prog.s"
3) used "llvm-as   new_prog.s -o new_prog.bc"
4) and then  "lli   new_prog.bc"

And it works.

any idea?


thanks
Raad





________________________________
From: Duncan Sands <baldrick at free.fr>
To: llvmdev at cs.uiuc.edu
Cc: RAAD B <raad_7007 at yahoo.com>
Sent: Friday, March 13, 2009 12:28:52 PM
Subject: Re: [LLVMdev] store the LLVM-bitcode from a pass

Hi Raad,

> opt  -load  ..../Decorator.so -dec <prog.bc> /dev/null
> 
> how can i store the modified bitcode on the disc (as bitcode or as human-readable assembly)?

  opt  -load  ..../Decorator.so -dec <prog.bc> new_prog.bc

Ciao,

Duncan.



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090313/f202575c/attachment.html>


More information about the llvm-dev mailing list