diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 2c25932bc78f..b6d1e24b907f 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -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;