[llvm] [NFC][TableGen] Refactor JSON and detailed record emitter (PR #105770)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 00:37:02 PDT 2024


================
@@ -26,22 +26,19 @@ namespace {
 
 class JSONEmitter {
 private:
-  RecordKeeper &Records;
+  const RecordKeeper &Records;
 
   json::Value translateInit(const Init &I);
 
 public:
-  JSONEmitter(RecordKeeper &R);
+  JSONEmitter(const RecordKeeper &R) : Records(R) {}
----------------
s-barannikov wrote:

```suggestion
  explicit JSONEmitter(const RecordKeeper &R) : Records(R) {}
```

https://github.com/llvm/llvm-project/pull/105770


More information about the llvm-commits mailing list