diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-04-26 20:59:58 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-04-26 20:59:58 +0000 |
commit | 855b91022d236cb9f2c7e7558af49a5c8a68b0b6 (patch) | |
tree | 1315b914427986f1fa78d4fbf52aa6729afd027a /llvm/lib/CodeGen/AsmPrinter | |
parent | 6f1937b10f1d67a866f5f84dc923b4a5e0de3a91 (diff) | |
download | bcm5719-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.cpp | 5 |
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()); |