[llvm] [NFC][TableGen] Adopt CodeGenHelpers in RegInfoEmitter (PR #179017)
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 3 07:17:42 PST 2026
================
@@ -106,10 +106,21 @@ class NamespaceEmitter {
Name.consume_front("::");
return Name;
}
+
std::string Name;
raw_ostream &OS;
};
+// Simple RAII helper for emitting anonymous namespace scope.
+class AnonNamespaceEmitter {
+public:
+ AnonNamespaceEmitter(raw_ostream &OS) : OS(OS) { OS << "namespace {\n\n"; }
+ ~AnonNamespaceEmitter() { OS << "} // namespace\n"; }
----------------
kosarev wrote:
Nit:
```suggestion
~AnonNamespaceEmitter() { OS << "} // anonymous namespace\n"; }
```
https://github.com/llvm/llvm-project/pull/179017
More information about the llvm-commits
mailing list