Map between LLVM IR instruction and line of source

1.9k views Asked by At

How can i store the map between LLVM IR instruction and line of source code if llvm-gcc or dragonegg are used?

1

There are 1 answers

0
Anton Korobeynikov On

Inside LLVM IR debug information should be used for this purpose. See http://llvm.org/docs/SourceLevelDebugging.html for more info.

llvm-gcc (and DragonEgg) will generate everything for you provided that the same information is available on GIMPLE level.