summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2016-04-21 21:36:11 +0000
committerAmaury Sechet <deadalnix@gmail.com>2016-04-21 21:36:11 +0000
commit7e16ce5a84c64eb60e6c1e984512ec58154a7b4c (patch)
tree6766dad4f3ca99666542bb42c97da891dcd17ae0 /llvm/lib/DebugInfo
parentaf7aaae1bc44454d0d05a473550357a69c208e09 (diff)
downloadbcm5719-llvm-7e16ce5a84c64eb60e6c1e984512ec58154a7b4c.tar.gz
bcm5719-llvm-7e16ce5a84c64eb60e6c1e984512ec58154a7b4c.zip
Remove various warnings. NFC
llvm-svn: 267061
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp3
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp6
2 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
index 999f2438d94..e927b60a447 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
@@ -163,7 +163,6 @@ std::error_code PDBFile::parseStreamData() {
uint32_t NumStreams = 0;
uint32_t StreamIdx = 0;
uint64_t DirectoryBytesRead = 0;
- std::error_code EC;
MemoryBufferRef M = *Context->Buffer;
const SuperBlock *SB = Context->SB;
@@ -185,7 +184,7 @@ std::error_code PDBFile::parseStreamData() {
makeArrayRef(reinterpret_cast<const uint32_t *>(M.getBufferStart() +
DirectoryBlockOffset),
SB->BlockSize / sizeof(support::ulittle32_t));
- if (EC = checkOffset(M, DirectoryBlock))
+ if (auto EC = checkOffset(M, DirectoryBlock))
return EC;
// We read data out of the directory four bytes at a time. Depending on
diff --git a/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp b/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp
index 05eac639d20..32c04beda78 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp
@@ -32,15 +32,15 @@ PDB_ErrorCode RawSession::createFromPdb(StringRef Path,
/*RequiresNullTerminator=*/false);
std::error_code EC;
- if (EC = ErrorOrBuffer.getError())
+ if ((EC = ErrorOrBuffer.getError()))
return PDB_ErrorCode::CouldNotCreateImpl;
std::unique_ptr<MemoryBuffer> &Buffer = ErrorOrBuffer.get();
std::unique_ptr<PDBFile> File(new PDBFile(std::move(Buffer)));
- if (EC = File->parseFileHeaders())
+ if ((EC = File->parseFileHeaders()))
return PDB_ErrorCode::InvalidFileFormat;
- if (EC = File->parseStreamData())
+ if ((EC = File->parseStreamData()))
return PDB_ErrorCode::InvalidFileFormat;
Session.reset(new RawSession(std::move(File)));
OpenPOWER on IntegriCloud