From: Dehao Chen Date: Tue, 25 Oct 2016 16:50:27 +0000 (+0000) Subject: Move discriminator assignment to where it is used. (NFC) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1472b509202b168e9a4b4a468eaa4a12769a38d;p=platform%2Fupstream%2Fllvm.git Move discriminator assignment to where it is used. (NFC) llvm-svn: 285084 --- diff --git a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp index a9b5d72..8120fa9 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);