[PATCH] WIP: AddDiscriminators: Check more carefully for equivalent locations

Duncan P. N. Exon Smith dexonsmith at apple.com
Thu Apr 9 17:26:01 PDT 2015


Stop using `DILocation::atSameLineAs()` to check whether two locations
are equivalent.  This check is too weak: it ignores any column info that
might be present, and ignores the scope/inlined-at chains.

Instead, just compare the pointers for equality.  If the pointers are
different here, we'll get different entries in the line table already.

I haven't updated testcases yet (there's one each failing in LLVM and
clang that would need to be rewritten), but basically: is there any
reason to add a discriminator if we'd *already* be getting different
entries in the line table?  (Is there a broken consumer we need to
support that relies on the discriminator field?)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-AddDiscriminators-Check-more-carefully-for-equiv.patch
Type: application/octet-stream
Size: 2270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150409/a8c4c40c/attachment.obj>


More information about the llvm-commits mailing list