Remove debug info from the byte code?

Hiya,

Is there any easy way to remove the debug info from the LLVM byte code
once I have collected all the debug info I needed? It is because the
debug info seems to slow down the program significantly. I may be able
to go through each basic block and delete the debug info in my pass.
But, is there any elegant way to do it?

Cheers,
Zheng

Hi Zheng,

Is there any easy way to remove the debug info from the LLVM byte code
once I have collected all the debug info I needed? It is because the
debug info seems to slow down the program significantly. I may be able
to go through each basic block and delete the debug info in my pass.
But, is there any elegant way to do it?

the opt tool has an option called -strip-debug, so presumably there is
already a pass or utility that does this.

Best wishes,

Duncan.

Yup, see StripDebugInfo() in StripSymbols.cpp.