[LLVMdev] clang with -emit-llvm

Somenath Chakraborty some.chak at gmail.com
Tue Jan 1 12:04:55 PST 2013


Hello,

I have just started using llvm. I was trying to debug how *clang* generates
IR for very simple C testcases (few assignments and if-condsitions).
To get a hold on the basic functions, I put some break points on following
functions but debugger *didn't stop*:

llvm::BasicBlock::Create
llvm::BinaryOperator::CreateAdd (design has binary op)
llvm::Value::Value
llvm::BranchInst::Create (design has if/else)
...
and quite a few

The command line I used :

*clang -S test.c -emit-llvm -o - *

Here I could see the entire LLVM code generated and shown in stdout. I am
almost sure that I have missed something very basic. Can anyone please help
me in setting *proper breakpoints* so that I can debug through the entire
IR generation phase.

Sorry for asking this basic question.

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


More information about the llvm-dev mailing list