OSDN Git Service

Revert r251680:
authorDehao Chen <dehao@google.com>
Fri, 30 Oct 2015 04:29:05 +0000 (04:29 +0000)
committerDehao Chen <dehao@google.com>
Fri, 30 Oct 2015 04:29:05 +0000 (04:29 +0000)
commite5920b3247ddb99946d407d11687bf5131e259f4
tree5e65633eee6c93eedf337d43af0cf5b194785d44
parentdf3ef600c0084faf378b97637ed69664b5413b81
Revert r251680:

Update the discriminator assignment algorithm

* If a scope has already been assigned a discriminator, do not reassign a nested discriminator for it.
* If the file and line both match, even if the column does not match, we should assign a new discriminator for the stmt.

original code:
; #1 int foo(int i) {
; #2 if (i == 3 || i == 5) return 100; else return 99;
; #3 }

; i == 3: discriminator 0
; i == 5: discriminator 2
; return 100: discriminator 1
; return 99: discriminator 3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251685 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/AddDiscriminators.cpp
test/Transforms/AddDiscriminators/oneline.ll