[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 07:11:04 PST 2025
================
@@ -0,0 +1,51 @@
+#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+
+#include "clang/CIR/Dialect/IR/CIRAttrs.h"
+
+namespace cir {
+
+template <typename ImplClass, typename RetTy> class CirAttrVisitor {
+public:
+ // FIXME: Create a TableGen list to automatically handle new attributes
+ template <typename... Args>
+ RetTy visit(mlir::Attribute attr, Args &&...args) {
----------------
erichkeane wrote:
The variadic is an interesting idea! I fear that gets unwieldy in practice though.
https://github.com/llvm/llvm-project/pull/125619
More information about the cfe-commits
mailing list