projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
824cabd
)
Move discriminator assignment to where it is used. (NFC)
author
Dehao Chen
<dehao@google.com>
Tue, 25 Oct 2016 16:50:27 +0000
(16:50 +0000)
committer
Dehao Chen
<dehao@google.com>
Tue, 25 Oct 2016 16:50:27 +0000
(16:50 +0000)
llvm-svn: 285084
llvm/lib/Transforms/Utils/AddDiscriminators.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp
b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp
index
a9b5d72
..
8120fa9
100644
(file)
--- a/
llvm/lib/Transforms/Utils/AddDiscriminators.cpp
+++ b/
llvm/lib/Transforms/Utils/AddDiscriminators.cpp
@@
-199,8
+199,8
@@
static bool addDiscriminators(Function &F) {
// discriminator is needed to distinguish both instructions.
auto R1 = Scopes.insert({Scope, nullptr});
DILexicalBlockFile *&NewScope = R1.first->second;
- unsigned Discriminator = InsertSuccess ? ++LDM[L] : LDM[L];
if (!NewScope) {
+ unsigned Discriminator = InsertSuccess ? ++LDM[L] : LDM[L];
auto *File = Builder.createFile(DIL->getFilename(),
Scope->getDirectory());
NewScope = Builder.createLexicalBlockFile(Scope, File, Discriminator);