================ @@ -22,11 +22,20 @@ // uses the record name by replacing Feature with Has. // value - Value to assign to the field in RISCVSubtarget when this // extension is enabled. Usually "true", but can be changed. -class RISCVExtension<string name, int major, int minor, string desc, +// IsExperimental +// - Indicates whether the extension is experimental +class RISCVExtension<int major, int minor, string desc, list<SubtargetFeature> implies = [], string fieldname = !subst("Feature", "Has", NAME), - string value = "true"> - : SubtargetFeature<name, fieldname, value, desc, implies> { + string value = "true", bit IsExperimental = false> + : SubtargetFeature< + !if(IsExperimental, "experimental-", "") ---------------- sunshaoce wrote:
Nice! https://github.com/llvm/llvm-project/pull/120040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits