[LLVMdev] Use the IR information to modify the AST

陳韋任 chenwj.cs97g at g2.nctu.edu.tw
Thu Mar 5 17:40:04 PST 2015

Hi Yao,

> I am try to get some information from the IR, such as Function type,
> Function arguments,
> I want to save then to the data structure which defined by myself, and I
> want use the data structure to modify the
> AST.
> But I know ,the IR was produced by the AST, I am not sure my thought is
> wright or not.
> If so, with API or function in the LLVM I will used? or some linkage or demo
> that I can learn form?

  The frontend (clang) should be the right place to modify the AST.
The information
you want could be get from the frontend, too. You might refer [1] to
see the basic idea.

[1] http://eli.thegreenplace.net/2012/06/08/basic-source-to-source-transformation-with-clang


Wei-Ren Chen (陳韋任)
Homepage: http://people.cs.nctu.edu.tw/~chenwj

More information about the llvm-dev mailing list