On Jul 31, 2007, at 1:30 AM, Anton Korobeynikov wrote:
Hello, Christopher.
+ tree RestrictArgTy = (DeclArgs) ? DeclArgs-
>type.common.type : ArgTy;
This looks very dangerous. Why can't standard TREE_ macro be used
here?
Also, please add a comment describing what's going here (why you need
such thing) :)
What specifically is dangerous about this?
I'm no GCC expert, but the DECL_ARGUMENTS() seems to be the only
place where the restrict qualifier is preserved under C++. While
debugging I could inspect the data structure to see that the
information I needed was there, but looking in tree.h I found no
TREE_... macro that got me there.
The ?: came about because while bootstrapping GCC there were cases
when DelArgs was NULL. It seems a bit of a hack, I know, but it's the
best I could figure and it seems to work properly in my tests. If you
have a suggestion on a more proper way to consistently get the
restrict qualifier I'm all ears. =)
--
Christopher Lamb
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits