summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 20:17:57 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 20:17:57 -0700
commit0916d96d12fda355933a8f66ed2a1ccc855cab9c (patch)
treeb947652ee49c65ae7b4fd30376804749b4de7f29 /llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
parent064a08cd955019da9130f1109bfa534e79b8ec7c (diff)
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp b/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
index 4e73f4214483..1d16211c65bf 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
@@ -736,7 +736,7 @@ Error BitcodeAnalyzer::parseBlock(unsigned BlockID, unsigned IndentLevel,
BlockStats.NumInstances++;
// BLOCKINFO is a special part of the stream.
- bool DumpRecords = O.hasValue();
+ bool DumpRecords = O.has_value();
if (BlockID == bitc::BLOCKINFO_BLOCK_ID) {
if (O && !O->DumpBlockinfo)
O->OS << Indent << "<BLOCKINFO_BLOCK/>\n";
@@ -898,7 +898,7 @@ Error BitcodeAnalyzer::parseBlock(unsigned BlockID, unsigned IndentLevel,
// If we found a module hash, let's verify that it matches!
if (BlockID == bitc::MODULE_BLOCK_ID && Code == bitc::MODULE_CODE_HASH &&
- CheckHash.hasValue()) {
+ CheckHash) {
if (Record.size() != 5)
O->OS << " (invalid)";
else {