diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-04-30 20:34:31 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-04-30 20:34:31 +0000 |
commit | dd2647edcf99a9e7b1af9b407ff1489b4ee45739 (patch) | |
tree | 2b9577895fc33cdbfc667deb81b222832e351d82 /llvm/lib/CodeGen/AsmPrinter | |
parent | 40286e0b6dc48cdfbcc2c54450afb5fc29b95494 (diff) | |
download | bcm5719-llvm-dd2647edcf99a9e7b1af9b407ff1489b4ee45739.tar.gz bcm5719-llvm-dd2647edcf99a9e7b1af9b407ff1489b4ee45739.zip |
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.
llvm-svn: 207701
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4033e65ace7..ac4eea4a50b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -218,6 +218,9 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) } } +// Define out of line so we don't have to include DwarfUnit.h in DwarfDebug.h. +DwarfDebug::~DwarfDebug() { } + // Switch to the specified MCSection and emit an assembler // temporary label to it if SymbolStem is specified. static MCSymbol *emitSectionSym(AsmPrinter *Asm, const MCSection *Section, diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index b5b07aee11d..d7359a3105e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -557,6 +557,8 @@ public: // DwarfDebug(AsmPrinter *A, Module *M); + ~DwarfDebug() override; + void insertDIE(const MDNode *TypeMD, DIE *Die) { MDTypeNodeToDieMap.insert(std::make_pair(TypeMD, Die)); } |