[cfe-dev] Guidance: clang or llvm

Munawar Hafiz munawar.hafiz at gmail.com
Sat Dec 18 22:21:02 PST 2010


Hi,
I am implementing refactorings in CDT using clang (or llvm?) as the analysis
engine. I am planning to write these library functions on top of clang, and
then using native calls to communicate with them. Here are some specific
things that I want to perform.

a) Given two variables, ask analysis engine if they are aliases or not.
b) Given a variable, find about its points-to-set.
c) Given a variable, follow its def-use chain.
d) Given a function, follow its call graph.
e) Given a cursor, browse the AST. The AST may involve multiple files.
etc..

The analysis should be inter-procedural.

These are not written as optimization passes, but should be function calls
that are like queries.

Please guide me as to: 1) whether I need to use llvm or clang, 2) which
parts of clang/llvm should I concentrate on.

Thanks in advance.

Munawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101219/e41369ec/attachment.html>


More information about the cfe-dev mailing list