[PATCH] D31440: PR32382: Adapt to LLVM changes in DIExpression.

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 28 14:09:37 PDT 2017


aprantl created this revision.

LLVM now interprets DIExpressions correctly and no longer determines the location description kind by looking at whether the first operator is a DW_OP_deref.

      

The code that emitted debug info for block captures used to rely on this and used the presence of an alloca (which was only emitted when optimizations were enabled) as a proxy for tweaking the expression in a way the resulted in the backend doing the right thing. This is now unnecessary and this patch unconditionally emits an alloca for block descriptors, which is then elided by mem2reg.

      

https://bugs.llvm.org/show_bug.cgi?id=32382
rdar://problem/31205000


https://reviews.llvm.org/D31440

Files:
  lib/CodeGen/CGBlocks.cpp
  lib/CodeGen/CGDebugInfo.cpp
  lib/CodeGen/CGDebugInfo.h
  test/CodeGenObjC/debug-info-block-captured-self.m
  test/CodeGenObjC/debug-info-blocks.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31440.93297.patch
Type: text/x-patch
Size: 13199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170328/e64b01c4/attachment-0001.bin>


More information about the cfe-commits mailing list