summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2017-02-01 23:51:56 +0000
committerPaul Robinson <paul.robinson@sony.com>2017-02-01 23:51:56 +0000
commit5362216c36e095d5fef86534f78aaf7ff44dc830 (patch)
treea3545f0b0125358348a4631ae030de044e222f63 /llvm/lib/CodeGen/AsmPrinter
parent0e8a8d120918471f7e6e35a912d6a720b409a541 (diff)
downloadbcm5719-llvm-5362216c36e095d5fef86534f78aaf7ff44dc830.tar.gz
bcm5719-llvm-5362216c36e095d5fef86534f78aaf7ff44dc830.zip
Remove an assertion that doesn't hold when mixing -g and -gmlt through
LTO. Replace it with a related assertion, ensuring that abstract variables appear only in abstract scopes. Part of PR31437. Differential Revision: http://reviews.llvm.org/D29430 llvm-svn: 293841
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 9ae25af2934..60d77d69ac2 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -731,6 +731,7 @@ DbgVariable *DwarfDebug::getExistingAbstractVariable(InlinedVariable IV) {
void DwarfDebug::createAbstractVariable(const DILocalVariable *Var,
LexicalScope *Scope) {
+ assert(Scope && Scope->isAbstractScope());
auto AbsDbgVariable = make_unique<DbgVariable>(Var, /* IA */ nullptr);
InfoHolder.addScopeVariable(Scope, AbsDbgVariable.get());
AbstractVariables[Var] = std::move(AbsDbgVariable);
@@ -1217,9 +1218,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
TheCU.getCUNode()->getEmissionKind() == DICompileUnit::LineTablesOnly &&
LScopes.getAbstractScopesList().empty() && !IsDarwin) {
assert(InfoHolder.getScopeVariables().empty());
- // FIXME: This wouldn't be true in LTO with a -g (with inlining) CU followed
- // by a -gmlt CU. Add a test and remove this assertion.
- assert(AbstractVariables.empty());
PrevLabel = nullptr;
CurFn = nullptr;
DebugHandlerBase::endFunction(MF);
OpenPOWER on IntegriCloud