summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-04-26 20:59:58 +0000
committerAdrian Prantl <aprantl@apple.com>2018-04-26 20:59:58 +0000
commit855b91022d236cb9f2c7e7558af49a5c8a68b0b6 (patch)
tree1315b914427986f1fa78d4fbf52aa6729afd027a /llvm/lib/CodeGen/AsmPrinter
parent6f1937b10f1d67a866f5f84dc923b4a5e0de3a91 (diff)
downloadbcm5719-llvm-855b91022d236cb9f2c7e7558af49a5c8a68b0b6.tar.gz
bcm5719-llvm-855b91022d236cb9f2c7e7558af49a5c8a68b0b6.zip
Revert "Fix a bug that prevents global variables from having a DW_OP_deref."
This reverts commit r3309704 while investigating bot breakage. llvm-svn: 330993
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index d893db42006..2eb0157f1e0 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -230,9 +230,8 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(
addOpAddress(*Loc, Sym);
}
}
- // Global variables attached to symbols are memory locations.
- DwarfExpr->setMemoryLocationKind();
- DwarfExpr->addExpression(Expr);
+ if (Expr)
+ DwarfExpr->addExpression(Expr);
}
if (Loc)
addBlock(*VariableDIE, dwarf::DW_AT_location, DwarfExpr->finalize());
OpenPOWER on IntegriCloud