Author: rnk Date: Tue May 31 12:42:56 2016 New Revision: 271305 URL: http://llvm.org/viewvc/llvm-project?rev=271305&view=rev Log: Work around MinGW's macro definition of 'interface' to 'struct'
Previous attempts to rename the IBOutletCollection argument to something other than "Interface" were undone (r127127 and r139620). Instead of renaming it, work around this in tablegen, so the public facing getter can have the usual name of 'getInterface'. Fixes PR26682 Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=271305&r1=271304&r2=271305&view=diff ============================================================================== --- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original) +++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Tue May 31 12:42:56 2016 @@ -194,6 +194,11 @@ namespace { lowerName[0] = std::tolower(lowerName[0]); upperName[0] = std::toupper(upperName[0]); } + // Work around MinGW's macro definition of 'interface' to 'struct'. We + // have an attribute argument called 'Interface', so only the lower case + // name conflicts with the macro definition. + if (lowerName == "interface") + lowerName = "interface_"; } virtual ~Argument() = default; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits