From: Zachary Turner Date: Thu, 18 May 2017 23:12:42 +0000 (+0000) Subject: Fix some build errors and warnings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bde49e308152b46409e50f75ba77e7ee39b72f35;p=llvm Fix some build errors and warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303391 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/DebugInfo/CodeView/CVTypeVisitor.cpp b/lib/DebugInfo/CodeView/CVTypeVisitor.cpp index b0f5378a2b7..035b2c0a6af 100644 --- a/lib/DebugInfo/CodeView/CVTypeVisitor.cpp +++ b/lib/DebugInfo/CodeView/CVTypeVisitor.cpp @@ -232,7 +232,7 @@ Error CVTypeVisitor::visitTypeStream(TypeCollection &Types) { CVType Type = Types.getType(*I); if (auto EC = visitTypeRecord(Type, *I)) return EC; - } while (I = Types.getNext(*I)); + } while ((I = Types.getNext(*I))); return Error::success(); } diff --git a/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/tools/llvm-pdbdump/LLVMOutputStyle.cpp index 4b94f8b7006..f75a2411ac2 100644 --- a/tools/llvm-pdbdump/LLVMOutputStyle.cpp +++ b/tools/llvm-pdbdump/LLVMOutputStyle.cpp @@ -668,7 +668,7 @@ Error LLVMOutputStyle::dumpTpiStream(uint32_t StreamIdx) { auto T = Types.getType(*I); if (auto EC = codeview::visitTypeRecord(T, *I, Pipeline)) return EC; - } while (I = Types.getNext(*I)); + } while ((I = Types.getNext(*I))); if (DumpTpiHash) { DictScope DD(P, "Hash"); diff --git a/tools/llvm-pdbdump/llvm-pdbdump.cpp b/tools/llvm-pdbdump/llvm-pdbdump.cpp index d9004f78a0e..1767c3cfda8 100644 --- a/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -886,7 +886,7 @@ static void mergePdbs() { DestIpi.addTypeRecord(Data, None); }); - SmallString<64> OutFile = opts::merge::PdbOutputFile; + SmallString<64> OutFile(opts::merge::PdbOutputFile); if (OutFile.empty()) { OutFile = opts::merge::InputFilenames[0]; llvm::sys::path::replace_extension(OutFile, "merged.pdb");