[PATCH] D29833: Improve the API of DILocation::getMergedLocation()
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 10:04:00 PST 2017
aprantl created this revision.
Herald added a subscriber: mehdi_amini.
In a recent thread on LLVM-dev "Stripping Debug Locations on cross BB moves, part 2 (PR31891)" we discovered that the existing API for
getMergedLocation() is unsafe when used on CallInstructions. This patch moves the API from DILocation on Instruction so it automatically behaves correctly (i.e. return a line-0 debug loc) when used on a call instruction.
Once we agree on the exact API, I will split the patch up into an NFC commit that just moves the API and is a NOP on CallInstructions, and a second one that returns the line-0 location for CallInstructions.
Repository:
rL LLVM
https://reviews.llvm.org/D29833
Files:
include/llvm/IR/DebugInfoMetadata.h
include/llvm/IR/Instruction.h
lib/IR/Instruction.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/InstCombine/InstCombinePHI.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29833.88013.patch
Type: text/x-patch
Size: 10527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/b0f21645/attachment.bin>
More information about the llvm-commits
mailing list