Is there any tutorial about using Clang to find all the basic control block?

I want to use Clang to do a source to source transformation of cpp code, I have achieve certain goals like this tutorial and currently I am trying to assign a unique ID to each basic control block.

Could anybody give me some help about how to find the basic control block?

Be more specified, I think the CFG class in Clang should help, but I don’t know how to implement it…

Thank you a lot!

Hi Shuai,

I want to use Clang to do a source to source transformation of cpp code, I have achieve certain goals like this tutorial and currently I am trying to assign a unique ID to each basic control block.

Clang questions like this should go to the clang developer list, cfe-dev@cs.uiuc.edu, rather than the LLVM developer list, llvmdev@cs.uiuc.edu.

Mark