summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-10-12 22:54:36 +0000
committerAdrian Prantl <aprantl@apple.com>2017-10-12 22:54:36 +0000
commita2f9e3a60fb97bf82a1029207ee81221fe13b3d5 (patch)
treed86905671af64e77fee39262fce532da927e9c24 /llvm/lib/CodeGen
parentdef3aa09763babc027eb6fa2db9548d9b73fee07 (diff)
downloadbcm5719-llvm-a2f9e3a60fb97bf82a1029207ee81221fe13b3d5.tar.gz
bcm5719-llvm-a2f9e3a60fb97bf82a1029207ee81221fe13b3d5.zip
Deprecate DwarfUnit::addBlockByrefAddress().
The clang frontend already creates a DIExpression that replicates the logic in addBlockByrefAddress() exactly, thus making this function effectively unreachable. To guard against human error I'm hereby marking the function with an assertion and let it hit the bots before eventually removing it. rdar://problem/31629055 llvm-svn: 315636
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 8b732765bf3..06b5b06c41b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -810,6 +810,12 @@ void DwarfCompileUnit::addGlobalTypeUnitType(const DIType *Ty,
/// DbgVariable based on provided MachineLocation.
void DwarfCompileUnit::addVariableAddress(const DbgVariable &DV, DIE &Die,
MachineLocation Location) {
+ // addBlockByrefAddress is obsolete and will be removed soon.
+ // The clang frontend always generates block byref variables with a
+ // complex expression that encodes exactly what addBlockByrefAddress
+ // would do.
+ assert((!DV.isBlockByrefVariable() || DV.hasComplexAddress()) &&
+ "block byref variable without a complex expression");
if (DV.hasComplexAddress())
addComplexAddress(DV, Die, dwarf::DW_AT_location, Location);
else if (DV.isBlockByrefVariable())
OpenPOWER on IntegriCloud