Add parentheses to silence warning.
authorJorge Gorbe Moya <jgorbe@google.com>
Wed, 7 Nov 2018 22:30:01 +0000 (22:30 +0000)
committerJorge Gorbe Moya <jgorbe@google.com>
Wed, 7 Nov 2018 22:30:01 +0000 (22:30 +0000)
DWARFContext.cpp:356:20: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]

llvm-svn: 346365

llvm/lib/DebugInfo/DWARF/DWARFContext.cpp

index 99cf9b985c00afa545575ede1b157b7430898f08..7ab54de6bc49e3ad604dc2d5e575381acf1ba403 100644 (file)
@@ -353,7 +353,7 @@ void DWARFContext::dump(
 
   auto dumpDebugInfo = [&](const char *Name, unit_iterator_range Units) {
     OS << '\n' << Name << " contents:\n";
-    if (DumpOffset = DumpOffsets[DIDT_ID_DebugInfo])
+    if ((DumpOffset = DumpOffsets[DIDT_ID_DebugInfo]))
       for (const auto &U : Units)
         U->getDIEForOffset(DumpOffset.getValue())
             .dump(OS, 0, DumpOpts.noImplicitRecursion());