[llvm] [llvm-pdbutil] Create DBI section headers in yaml2pdb (PR #166566)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 06:31:06 PST 2025
================
@@ -865,6 +869,18 @@ static void yamlToPdb(StringRef Path) {
}
}
+ std::vector<object::coff_section> Sections;
+ if (!Dbi.SectionHeaders.empty()) {
+ for (const auto &Hdr : Dbi.SectionHeaders)
+ Sections.emplace_back(Hdr.toCoffSection());
+
+ DbiBuilder.createSectionMap(Sections);
+ ExitOnErr(DbiBuilder.addDbgStream(
+ pdb::DbgHeaderType::SectionHdr,
+ ArrayRef<uint8_t>{(const uint8_t *)Sections.data(),
----------------
aganea wrote:
`ArrayRef` supports constructing from a `std::vector` directly, you could probably just do `ArrayRef(Sections)`?
https://github.com/llvm/llvm-project/pull/166566
More information about the llvm-commits
mailing list