[PATCH] D29833: Improve the API of DILocation::getMergedLocation()

Taewook Oh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 15:38:29 PST 2017


twoh added a comment.

In https://reviews.llvm.org/D29833#682865, @probinson wrote:

> In https://reviews.llvm.org/D29833#682595, @twoh wrote:
>
> > I don't have strong opinion about scope, because anyway we won't be able to have precise scope. Taking DISubprogram of the destination instruction might be a conservative option.
>
>
> Mmmm...  Does scope imply source file?  LTO can inline across CUs, then merging an instruction from CU#1 into a scope from CU#2 would make the line number meaningless.


My understanding is that if two instructions come from different source file, canDiscriminate will return true because filenames are different and the merged metadata will have a line 0 location.


Repository:
  rL LLVM

https://reviews.llvm.org/D29833





More information about the llvm-commits mailing list