[llvm-branch-commits] [Remarks] BitstreamRemarkParser: Refactor error handling (PR #156511)
Jon Roelofs via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 11 07:28:18 PDT 2025
================
@@ -13,81 +13,171 @@
#ifndef LLVM_LIB_REMARKS_BITSTREAM_REMARK_PARSER_H
#define LLVM_LIB_REMARKS_BITSTREAM_REMARK_PARSER_H
-#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Remarks/BitstreamRemarkContainer.h"
+#include "llvm/Remarks/Remark.h"
#include "llvm/Remarks/RemarkFormat.h"
#include "llvm/Remarks/RemarkParser.h"
+#include "llvm/Remarks/RemarkStringTable.h"
#include "llvm/Support/Error.h"
-#include <array>
+#include "llvm/Support/FormatVariadic.h"
#include <cstdint>
#include <memory>
#include <optional>
namespace llvm {
namespace remarks {
-struct Remark;
+class BitstreamBlockParserHelperBase {
+protected:
+ BitstreamCursor &Stream;
+
+ unsigned BlockID;
+ StringRef BlockName;
+
+public:
+ BitstreamBlockParserHelperBase(BitstreamCursor &Stream, unsigned BlockID,
+ StringRef BlockName)
+ : Stream(Stream), BlockID(BlockID), BlockName(BlockName) {}
----------------
jroelofs wrote:
to go with the other re-ordering:
```suggestion
: Stream(Stream), BlockName(BlockName), BlockID(BlockID) {}
```
https://github.com/llvm/llvm-project/pull/156511
More information about the llvm-branch-commits
mailing list