[llvm-commits] PATCH : change clang Attrs.td to avoid conflict w/MinGW basetyps.h

kirk.beitz at nokia.com kirk.beitz at nokia.com
Wed Feb 2 21:55:06 PST 2011


Attached, please find a patch to tools/clang/include/clang/Basic/Attrs.td

It is used to generate tools/clang/includes/clang/AST/Attrs.inc, which gets #included by Attr.h (which in turn is getting #included several nested levels deep in our effort to build lldb under MinGW ).

Before the change, one of the classes to be generated defines "Args=>Interface".  This causes a class with a private member variable named "interface" to get generated, and under MinGW, when code pulls in both this and basetyps.h before it, a conflict results, because basetyps.h will (under most circumstances) generate a line that essentially performs

#define interface struct

The change in the patch simply changes "Args=>Interface" to "Args=>InterFace" so that the private member variable that gets generated is "interFace".  This mimics the style elsewhere in this file (e.g. "Args=>FormatIdx" generates a private member variable "formatIdx").

And with the capitalization difference, the conflict with MinGW basetyps.h is avoided.

Thanks in advance for any review/comments/feedback.


Index: include/clang/Basic/Attr.td
===================================================================
--- include/clang/Basic/Attr.td (revision 123723)
+++ include/clang/Basic/Attr.td (working copy)
@@ -258,7 +258,7 @@

 def IBOutletCollection : Attr {
   let Spellings = ["iboutletcollection"];
-  let Args = [TypeArgument<"Interface">];
+  let Args = [TypeArgument<"InterFace">];
 }

 def Malloc : Attr {



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110203/b55d2981/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Attr.td.patch
Type: application/octet-stream
Size: 415 bytes
Desc: Attr.td.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110203/b55d2981/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110203/b55d2981/attachment.htm>


More information about the llvm-commits mailing list