[LLVMdev] adding new data types to llvm (original) (raw)

John Wiegley johnw at boostpro.com
Fri Jul 13 16:11:34 PDT 2012


Edvard Ghazaryan <edvardgh at yahoo.com> writes:

I would like to add new custom data type to llvm C parser, I use LLVM/Clang version 3.1. Adding new type instructions from llvm.org site are out of date (http:// llvm.org/docs/ExtendingLLVM.html#type). Could you please provide me with guidance?

Check out include/clang/AST/Type.h in the clang sources. Pick an existing type with similar semantics to what you want to add (pointer type, scalar type, etc), and then derive a new class either from Type, or from the type you want to specialize.

-- John Wiegley BoostPro Computing http://www.boostpro.com



More information about the llvm-dev mailing list