diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-01-23 02:24:03 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-01-23 02:24:03 +0000 |
commit | b06bcde1ab0dd598c9d27c45e1d7553745c8077e (patch) | |
tree | edca8cccfde28bc753a0c4a06425d91f709f9efe /clang/lib/CodeGen/CGVTables.cpp | |
parent | 0218ce10804ab2f029d8c79e1f3ff3c76ff37c59 (diff) | |
download | bcm5719-llvm-b06bcde1ab0dd598c9d27c45e1d7553745c8077e.tar.gz bcm5719-llvm-b06bcde1ab0dd598c9d27c45e1d7553745c8077e.zip |
DebugInfo: Omit class definitions even in the presence of available_externally vtables
To ensure optimization level doesn't pessimize the -fstandalone-debug
vtable debug info optimization (where class definitions are only emitted
where the vtable is emitted - reducing redundant debug info) ensure the
debug info class definition is still omitted when an
available_externally vtable definition is emitted for optimization
purposes.
llvm-svn: 292768
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 04c5cfe5365..24c7f15a084 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -744,9 +744,10 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { switch (keyFunction->getTemplateSpecializationKind()) { case TSK_Undeclared: case TSK_ExplicitSpecialization: - assert((def || CodeGenOpts.OptimizationLevel > 0) && - "Shouldn't query vtable linkage without key function or " - "optimizations"); + assert((def || CodeGenOpts.OptimizationLevel > 0 || + CodeGenOpts.getDebugInfo() != codegenoptions::NoDebugInfo) && + "Shouldn't query vtable linkage without key function, " + "optimizations, or debug info"); if (!def && CodeGenOpts.OptimizationLevel > 0) return llvm::GlobalVariable::AvailableExternallyLinkage; |