[clang] [CIR][NFC] Use tablegen to create CIRAttrToValue visitor declarations (PR #187607)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 19 17:22:18 PDT 2026
================
@@ -29,6 +29,11 @@ include "clang/CIR/Interfaces/ASTAttrInterfaces.td"
class CIR_Attr<string name, string attrMnemonic, list<Trait> traits = []>
: AttrDef<CIR_Dialect, name, traits> {
let mnemonic = attrMnemonic;
+
+ // When set, clang-tblgen includes this attribute in the DirectToLLVM
+ // `CIRAttrToValue` TypeSwitch and emits a `visitCirAttr` declaration;
+ // a matching definition must exist in LowerToLLVM.cpp.
+ bit hasAttrToValueLowering = 0;
----------------
erichkeane wrote:
Can we have a FIXME on this to explore some of the suggested Heuristics you mentioned (TypeInterface/etc?). Would be nice if someone could check that out someday
https://github.com/llvm/llvm-project/pull/187607
More information about the cfe-commits
mailing list