13

From an llvm pass, I need to print an llvm instruction (Type llvm::Instruction) on the screen, just like as it appears in the llvm bitcode file. Actually my compilation is crashing, and does not reach the point where bitcode file is generated. So for debugging I want to print some instructions to know what is going wrong.

4

2 回答 2

16

Assuming I is your instruction

I.print(errs());
于 2015-10-29T23:26:56.553 回答
7

By simply using the print method.

于 2012-11-12T17:39:34.360 回答