================
@@ -50,6 +50,43 @@ class CIR_UnitAttr<string name, string attrMnemonic,
list<Trait> traits = []>
let isOptional = 1;
}
+//===----------------------------------------------------------------------===//
+// SourceLanguageAttr
+//===----------------------------------------------------------------------===//
+
+def CIR_SourceLanguage : CIR_I32EnumAttr<"SourceLanguage", "source language", [
+ I32EnumAttrCase<"C", 1, "c">,
+ I32EnumAttrCase<"CXX", 2, "cxx">
+]> {
+ // The enum attr class is defined in `CIR_SourceLanguageAttr` below,
+ // so that it can define extra class methods.
+ let genSpecializedAttr = 0;
+}
+
+def CIR_SourceLanguageAttr : CIR_EnumAttr<CIR_SourceLanguage, "lang"> {
----------------
bcardosolopes wrote:
Should we verify this attribute only happens at the module level?
https://github.com/llvm/llvm-project/pull/152511
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits