[cfe-dev] getTypeID
Eli Friedman
eli.friedman at gmail.com
Fri Oct 21 17:39:39 PDT 2011
On Fri, Oct 21, 2011 at 5:12 PM, Anderson, Todd A
<todd.a.anderson at intel.com> wrote:
> How, where, and when does the ID field of a Type get filled in? I'm trying to add a new fundamental type whose TypeID should be PointerTyID. Where should I associate this new language type with the class Type's TypeID?
To get an llvm::Type with an ID of PointerTyID, use
llvm::PointerType::get(). The conversion between clang::Type and
llvm::Type is done in clang/lib/CodeGen/CodeGenTypes.cpp . I might be
able to say more with better description of what you are trying to do.
-Eli
More information about the cfe-dev
mailing list