Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 79844fc

Browse files
committed
Fix the clang-cl self-host build by defining ~DwarfDebug out of line
DwarfDebug.h has a SmallVector member containing a unique_ptr of an incomplete type. MSVC doesn't have key functions, so the vtable and dtor are emitted in AsmPrinter.cpp, where DwarfDebug's ctor is called. AsmPrinter.cpp include DwarfUnit.h and doesn't get a complete definition of DwarfTypeUnit. We could fix the problem by including DwarfUnit.h in DwarfDebug.h, but that would increase header bloat. Instead, define ~DwarfDebug out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207701 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 6f32742 commit 79844fc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
218218
}
219219
}
220220

221+
// Define out of line so we don't have to include DwarfUnit.h in DwarfDebug.h.
222+
DwarfDebug::~DwarfDebug() { }
223+
221224
// Switch to the specified MCSection and emit an assembler
222225
// temporary label to it if SymbolStem is specified.
223226
static MCSymbol *emitSectionSym(AsmPrinter *Asm, const MCSection *Section,

lib/CodeGen/AsmPrinter/DwarfDebug.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,8 @@ class DwarfDebug : public AsmPrinterHandler {
557557
//
558558
DwarfDebug(AsmPrinter *A, Module *M);
559559

560+
~DwarfDebug() override;
561+
560562
void insertDIE(const MDNode *TypeMD, DIE *Die) {
561563
MDTypeNodeToDieMap.insert(std::make_pair(TypeMD, Die));
562564
}

0 commit comments

Comments
 (0)