[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:27:54 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;
----------------
jroelofs wrote:
My intuition says this will have better struct layout, though I haven't checked:
```suggestion
StringRef BlockName;
unsigned BlockID;
```
https://github.com/llvm/llvm-project/pull/156511
More information about the llvm-branch-commits
mailing list