[LLVMdev] Naming of types by DragonEgg vs. LLVM-GCC
Teemu Rinta-aho
teemu.rinta-aho at nomadiclab.com
Thu Apr 28 02:31:43 PDT 2011
Hi all,
I used to use llvm-g++ to transform C++ source to LLVM IR. Now I am trying to
switch to using DragonEgg, but I faced some problems because of the way DragonEgg
is naming types in the resulting IR file. An example:
LLVM-GCC:
%"struct.Vector<ARPResponder::Entry>" = type { %"struct.ARPResponder::Entry"*, i32, i32 }
%"struct.Vector<String>" = type { %struct.String*, i32, i32 }
%"struct.Vector<int>" = type { i32*, i32, i32 }
DragonEgg:
%struct.Vector = type { %struct.Entry*, i32, i32 }
%2 = type { %struct.String*, i32, i32 }
%3 = type { i32*, i32, i32 }
With the LLVM-GCC version I could easily get type for "struct.Vector<String>". With the
DragonEgg version I would need another mapping from that name to "2". The same problem
can be seen with the "struct.ARPResponder::Entry" becoming just "struct.Entry".
Is there a way to make DragonEgg name the types the same way LLVM-GCC does, preserving
C++ naming a bit more?
BR,
Teemu
More information about the llvm-dev
mailing list