[cfe-dev] Adding new data type
John McCall
rjmccall at apple.com
Thu Apr 29 09:45:42 PDT 2010
On Apr 29, 2010, at 1:06 AM, Renato Golin wrote:
> On 28 April 2010 23:36, kalyan ponnala <ponnala.kalyan at gmail.com> wrote:
>> Hello Group,
>>
>> I am trying to add a new data type to clang. Can someone tell me the
>> important files and classes to look into and how to start in order to lex
>> and parse and generate an AST node to this new data type.
>
> First you have to add the new type to the Type hierarchy. See
> include/llvm/Type.h and its derived classes, find a suitable spot and
> implement it.
I think you mean include/clang/AST/Type.h. But changes to the type system can be very subtle; Kalyan, if you can be more specific about what type you're thinking of adding, we can give better advice. There isn't much internal documentation on adding a type.
John.
More information about the cfe-dev
mailing list