[llvm-branch-commits] [Remarks] Restructure bitstream remarks to be fully standalone (PR #156715)
Jon Roelofs via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 11 08:08:46 PDT 2025
================
@@ -232,43 +221,40 @@ void BitstreamRemarkSerializerHelper::setupBlockInfo() {
}
void BitstreamRemarkSerializerHelper::emitMetaBlock(
- uint64_t ContainerVersion, std::optional<uint64_t> RemarkVersion,
- std::optional<const StringTable *> StrTab,
std::optional<StringRef> Filename) {
// Emit the meta block
Bitstream.EnterSubblock(META_BLOCK_ID, 3);
// The container version and type.
R.clear();
R.push_back(RECORD_META_CONTAINER_INFO);
- R.push_back(ContainerVersion);
+ R.push_back(CurrentContainerVersion);
R.push_back(static_cast<uint64_t>(ContainerType));
Bitstream.EmitRecordWithAbbrev(RecordMetaContainerInfoAbbrevID, R);
switch (ContainerType) {
- case BitstreamRemarkContainerType::SeparateRemarksMeta:
- assert(StrTab != std::nullopt && *StrTab != nullptr);
- emitMetaStrTab(**StrTab);
+ case BitstreamRemarkContainerType::RemarksFileExternal:
assert(Filename != std::nullopt);
emitMetaExternalFile(*Filename);
break;
- case BitstreamRemarkContainerType::SeparateRemarksFile:
- assert(RemarkVersion != std::nullopt);
- emitMetaRemarkVersion(*RemarkVersion);
- break;
- case BitstreamRemarkContainerType::Standalone:
- assert(RemarkVersion != std::nullopt);
- emitMetaRemarkVersion(*RemarkVersion);
- assert(StrTab != std::nullopt && *StrTab != nullptr);
- emitMetaStrTab(**StrTab);
+ case BitstreamRemarkContainerType::RemarksFile:
+ emitMetaRemarkVersion(CurrentRemarkVersion);
break;
}
Bitstream.ExitBlock();
----------------
jroelofs wrote:
likewise
https://github.com/llvm/llvm-project/pull/156715
More information about the llvm-branch-commits
mailing list