summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Remarks/BitstreamRemarkParser.h
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-09 13:00:36 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-09 13:01:05 +0000
commit56a725ae5e1d5ad8673658bbd7717a9fe1ef054f (patch)
treedac9f34d03999aaee730456f65db7c43aa3f6f50 /llvm/lib/Remarks/BitstreamRemarkParser.h
parentdda8015434c41fcad81c49dee581666b05c40a08 (diff)
downloadbcm5719-llvm-56a725ae5e1d5ad8673658bbd7717a9fe1ef054f.tar.gz
bcm5719-llvm-56a725ae5e1d5ad8673658bbd7717a9fe1ef054f.zip
Remarks - fix static analyzer warnings. NFCI.
- Fix uninitialized variable warnings. - Reuse BitstreamEntry iterator to avoid Wshadow warning. - Match declaration + definition arg names in BitstreamRemarkParser::processCommonMeta - Make BitstreamRemarkParser(StringRef) constructor explicit
Diffstat (limited to 'llvm/lib/Remarks/BitstreamRemarkParser.h')
-rw-r--r--llvm/lib/Remarks/BitstreamRemarkParser.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Remarks/BitstreamRemarkParser.h b/llvm/lib/Remarks/BitstreamRemarkParser.h
index 7c9cc2f1e7d..749219fc515 100644
--- a/llvm/lib/Remarks/BitstreamRemarkParser.h
+++ b/llvm/lib/Remarks/BitstreamRemarkParser.h
@@ -34,15 +34,16 @@ struct BitstreamRemarkParser : public RemarkParser {
std::unique_ptr<MemoryBuffer> TmpRemarkBuffer;
/// The common metadata used to decide how to parse the buffer.
/// This is filled when parsing the metadata block.
- uint64_t ContainerVersion;
- uint64_t RemarkVersion;
- BitstreamRemarkContainerType ContainerType;
+ uint64_t ContainerVersion = 0;
+ uint64_t RemarkVersion = 0;
+ BitstreamRemarkContainerType ContainerType =
+ BitstreamRemarkContainerType::Standalone;
/// Wether the parser is ready to parse remarks.
bool ReadyToParseRemarks = false;
/// Create a parser that expects to find a string table embedded in the
/// stream.
- BitstreamRemarkParser(StringRef Buf)
+ explicit BitstreamRemarkParser(StringRef Buf)
: RemarkParser(Format::Bitstream), ParserHelper(Buf) {}
/// Create a parser that uses a pre-parsed string table.
OpenPOWER on IntegriCloud