store the LLVM-bitcode from a pass

Hello together,

I use the “opt” as following, to run my pass, which modifies the LLVM-IR by inserting instructions in basic-blocks.

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)?

Regards
Raad

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.