diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2018-03-15 12:28:48 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2018-03-15 12:28:48 +0000 |
commit | f4ceef8d3f1d211b7c77566fb63c76c13a688ef2 (patch) | |
tree | a687943f806e40e89db4f45f41f9d65e51d58fb2 /lldb/packages/Python/lldbsuite/support/fs.py | |
parent | e0207e4948b31338bb4190eca6ad5d8faa24ca12 (diff) | |
download | bcm5719-llvm-f4ceef8d3f1d211b7c77566fb63c76c13a688ef2.tar.gz bcm5719-llvm-f4ceef8d3f1d211b7c77566fb63c76c13a688ef2.zip |
[Debug] Retain both copies of debug intrinsics in HoistThenElseCodeToIf
When hoisting common code from the "then" and "else" branches of a condition
to before the "if", the HoistThenElseCodeToIf routine will attempt to merge
the debug location associated with the two original copies of the hoisted
instruction.
This is a problem in the special case where the hoisted instruction is a
debug info intrinsic, since for those the debug location is considered
part of the intrinsic and attempting to modify it may resut in invalid
IR. This is the underlying cause of PR36410.
This patch fixes the problem by handling debug info intrinsics specially:
instead of hoisting one copy and merging the two locations, the code now
simply hoists both copies, each with its original location intact. Note
that this is still only done in the case where both original copies are
otherwise (i.e. apart from location metadata) identical.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D44312
llvm-svn: 327622
Diffstat (limited to 'lldb/packages/Python/lldbsuite/support/fs.py')
0 files changed, 0 insertions, 0 deletions