Hi guys,<br><br>Thanks for the replies. I am trying to add support to a new architecture called Line Associative Registers. It has vector registers in it. I would like to add a vector data type such as int[4] which could access a register with a width of 4 integers in it (max). Since it has to be mentioned in the source as<br>
<br>int[4] = {1, 2, 3, 4}<br><br>I am not sure about how to proceed. This form looks like an array with 4 elements but I want it to be a datatype. <br>I was looking into targetinfo.h and initpreprocessor.cpp. it looks like I can add a new type here or change the existing one. And about the type.h in ClangAST target, will it work if I added this type here. <br>
<br>Any advices about how to proceed would be really appreciated. <br><br>Thanks again.<br><br><div class="gmail_quote">On Thu, Apr 29, 2010 at 12:45 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>
On Apr 29, 2010, at 1:06 AM, Renato Golin wrote:<br>
<br>
> On 28 April 2010 23:36, kalyan ponnala <<a href="mailto:ponnala.kalyan@gmail.com">ponnala.kalyan@gmail.com</a>> wrote:<br>
>> Hello Group,<br>
>><br>
>> I am trying to add a new data type to clang. Can someone tell me the<br>
>> important files and classes to look into and how to start in order to lex<br>
>> and parse and generate an AST node to this new data type.<br>
><br>
> First you have to add the new type to the Type hierarchy. See<br>
> include/llvm/Type.h and its derived classes, find a suitable spot and<br>
> implement it.<br>
<br>
</div>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.<br>

<font color="#888888"><br>
John.</font></blockquote></div><br><br clear="all"><br>-- <br>Kalyan Ponnala<br>phone: 8163772059<br>
<div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>