[cfe-dev] how to get c++ name for llvm::Type
eli.friedman at gmail.com
Wed Jul 7 08:59:45 PDT 2010
On Wed, Jul 7, 2010 at 8:44 AM, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:
> if I compile code from c++ to llvm using clang I want to reverse-lookup
> the type names of some simple structures e.g.
> struct Foo
> int bar;
> I would need a function that returns the name or clang::TagDecl
> given the llvm::Type.
> How can this be done?
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?
More information about the cfe-dev