summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2016-10-25 16:50:27 +0000
committerDehao Chen <dehao@google.com>2016-10-25 16:50:27 +0000
commitc1472b509202b168e9a4b4a468eaa4a12769a38d (patch)
treed3a29a2f93caf7cd58405bc9a92d2a25997411bd /llvm/lib/Transforms/Utils
parent824cabd06d61b91f1ef1da93a777a43f8b21ffb1 (diff)
downloadbcm5719-llvm-c1472b509202b168e9a4b4a468eaa4a12769a38d.tar.gz
bcm5719-llvm-c1472b509202b168e9a4b4a468eaa4a12769a38d.zip
Move discriminator assignment to where it is used. (NFC)
llvm-svn: 285084
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/AddDiscriminators.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp
index a9b5d7206b7..8120fa93113 100644
--- 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);
OpenPOWER on IntegriCloud