[llvm] [SystemZ][z/OS] Implement yaml2obj for GOFF Object File Format (PR #71445)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 00:35:58 PST 2023


================
@@ -73,6 +73,22 @@ raw_ostream &operator<<(raw_ostream &OS, const yaml::BinaryRef &Data) {
 // physical records are created for the data. Possible fill bytes at the end of
 // a physical record are written automatically.
 class GOFFOstream : public raw_ostream {
+
+public:
+  explicit GOFFOstream(raw_ostream &OS)
+      : OS(OS), LogicalRecords(0), RemainingSize(0), NewLogicalRecord(false) {
+    SetBufferSize(GOFF::PayloadLength);
+  }
+
+  ~GOFFOstream() { finalize(); }
+
+  void newRecord(GOFF::RecordType Type, size_t Size);
----------------
jh7370 wrote:

Nit: this should be a verb phrase, e.g. `makeNewRecord`. See https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly.

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


More information about the llvm-commits mailing list