We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfd0cb5 commit 9d65abbCopy full SHA for 9d65abb
heavy/lib/Nbdl/NbdlWriter.cpp
@@ -455,6 +455,7 @@ class ContextWriter : public NbdlWriter<ContextWriter> {
455
<< Op.getName() << '(' << Op.getName() << " const&) = delete;\n"
456
<< Op.getName() << '(' << Op.getName() << "&) = delete;\n";
457
WriteConstructor(Op);
458
+ WriteAccessors();
459
OS << "};\n";
460
Flush();
461
}
@@ -556,6 +557,13 @@ class ContextWriter : public NbdlWriter<ContextWriter> {
556
557
SetErrorV("unsupported operation arguments", Member);
558
559
560
+
561
+ void WriteAccessors() {
562
+ for (mlir::Value Value : Members) {
563
+ OS << "decltype(auto) get_" << GetLocalVal(Value)
564
+ << "() const {\n return " << GetLocalVal(Value) << ";\n}\n";
565
+ }
566
567
};
568
569
} // end namespace
0 commit comments