[llvm] r196412 - Couple of small logical cleanups to use !empty rather than other

Eric Christopher echristo at gmail.com
Wed Dec 4 13:20:15 PST 2013


Author: echristo
Date: Wed Dec  4 15:20:15 2013
New Revision: 196412

URL: http://llvm.org/viewvc/llvm-project?rev=196412&view=rev
Log:
Couple of small logical cleanups to use !empty rather than other
checks. No functional change.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=196412&r1=196411&r2=196412&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Dec  4 15:20:15 2013
@@ -523,7 +523,7 @@ DIE *DwarfDebug::constructLexicalScopeDI
 DIE *DwarfDebug::constructInlinedScopeDIE(CompileUnit *TheCU,
                                           LexicalScope *Scope) {
   const SmallVectorImpl<InsnRange> &ScopeRanges = Scope->getRanges();
-  assert(ScopeRanges.empty() == false &&
+  assert(!ScopeRanges.empty() &&
          "LexicalScope does not have instruction markers!");
 
   if (!Scope->getScopeNode())
@@ -3042,7 +3042,7 @@ CompileUnit *DwarfDebug::constructSkelet
   }
 
   // Attribute if we've emitted any ranges and their location for the compile unit.
-  if (CU->getRangeLists().size()) {
+  if (!CU->getRangeLists().empty()) {
     if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
       NewCU->addSectionLabel(
           Die, dwarf::DW_AT_GNU_ranges_base,





More information about the llvm-commits mailing list