[cfe-dev] how to get c++ name for llvm::Type

Jochen Wilhelmy j.wilhelmy at arcor.de
Wed Jul 7 09:10:43 PDT 2010

> In general, it can't; LLVM types are purely structural, so there may
> be many C++ types which map to the same LLVM type.  What are you
> trying to do?
I convert the resulting LLVM IR to some other representation and for 
this I need some
named types (i.e. intrinsic types). It would be ok to use __attribute__ 
on the type to set the name
as attribute that makes into the backend. something like
__attribute__(myType("Foo")) struct Foo


More information about the cfe-dev mailing list