From: David Blaikie Date: Fri, 28 Jun 2013 18:55:13 +0000 (+0000) Subject: DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool' X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1ca79907ef144358f16bb8abea849e806ca31134;p=oota-llvm.git DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185190 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c57cf310e69..a954eaea3f4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -250,7 +250,8 @@ unsigned DwarfUnits::getStringPoolIndex(StringRef Str) { unsigned DwarfUnits::getAddrPoolIndex(const MCSymbol *Sym) { std::pair::iterator, bool> P = AddressPool.insert(std::make_pair(Sym, NextAddrPoolNumber)); - NextAddrPoolNumber += P.second; + if (P.second) + ++NextAddrPoolNumber; return P.first->second; }