We do not implicitly create an OpenCLImageAccessAttr, so this change only affects out of tree users. There is no way to test this behavior specifically that I can see, since this only affects implicit creation of attributes.
Fixes PR22403.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231803
91177308-0d34-0410-b5e6-
96231b3b80d8
Uniques.insert(EnumName);
if (I != Spellings.begin())
Ret += ",\n";
- Ret += " " + EnumName;
+ // Duplicate spellings are not considered part of the semantic spelling
+ // enumeration, but the spelling index and semantic spelling values are
+ // meant to be equivalent, so we must specify a concrete value for each
+ // enumerator.
+ Ret += " " + EnumName + " = " + llvm::utostr(Idx);
}
Ret += "\n };\n\n";
return Ret;