<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">But the requirement is to generate the CDFG of only a specific function and hence I am looking to iterate over the member functions only.</blockquote>
<div><br></div><div>If you just need a specific function, why are you searching through only member functions? You could keep this general by just accepting a mangled (or unmangled, if you include argument types & all the rest of the stuff that goes into mangling - I expect there's an unmangling API somewhere in clang) name & analyze that uniquely identified function.<br>
<br>You could even separate this function out from the LLVM bitcode so you can run the optimizers on the function alone, potentially.<br><br></div><div>But no, I don't think Clang will give you a CDFG - either it'll compile C, C++, ObjC* to LLVM bitcode, or it has an API over the AST to do source analysis, but it's not really designed for much in between, so far as I know. </div>
</div>