[LLVMdev] code gen variable mapping

Niko Zarzani niko.zarzani at gmail.com
Sun Mar 31 15:06:16 PDT 2013


Hi all, 

Since variables in the source code are renamed in the IR, I wanted to ask you how and where this mapping is done in Clang.
I am interested in converting the variable names in some C strings to the one in the IR. 
For example if at a certain point of the program I have a string  like "x>0" I want to change it in "%x>0" (I already implemented a parser to recognize the identifiers so I only need to translate the name). 
If you have any suggestion in how to do it easily (like if there is already a data structure or a method to call) it will be really appreciated.

Thank you in advance,

Niko



More information about the llvm-dev mailing list