[llvm] [llvm-pdbutil] Create DBI section headers in yaml2pdb (PR #166566)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 06:36:00 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(),
----------------
Nerixyz wrote:
I can't do it here, because `Sections` is a `std::vector<object::coff_section>` and the function expects an `ArrayRef<uint8_t>` (i.e. the element type doesn't match).
https://github.com/llvm/llvm-project/pull/166566
More information about the llvm-commits
mailing list