summaryrefslogtreecommitdiffstats
path: root/lld/COFF/PDB.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/PDB.cpp')
-rw-r--r--lld/COFF/PDB.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp
index bbc8296f013..53f50f30095 100644
--- a/lld/COFF/PDB.cpp
+++ b/lld/COFF/PDB.cpp
@@ -30,7 +30,7 @@ using namespace llvm::support::endian;
static ExitOnError ExitOnErr;
-void coff::createPDB(StringRef Path) {
+void coff::createPDB(StringRef Path, ArrayRef<uint8_t> SectionTable) {
BumpPtrAllocator Alloc;
pdb::PDBFileBuilder Builder(Alloc);
ExitOnErr(Builder.initialize(4096)); // 4096 is blocksize
@@ -63,6 +63,10 @@ void coff::createPDB(StringRef Path) {
auto &IpiBuilder = Builder.getIpiBuilder();
IpiBuilder.setVersionHeader(pdb::PdbTpiV80);
+ // Add COFF section header stream.
+ ExitOnErr(
+ DbiBuilder.addDbgStream(pdb::DbgHeaderType::SectionHdr, SectionTable));
+
// Write to a file.
ExitOnErr(Builder.commit(Path));
}
OpenPOWER on IntegriCloud