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.