aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Remarks
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 20:05:16 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 20:05:16 -0700
commit064a08cd955019da9130f1109bfa534e79b8ec7c (patch)
treee097a750d667d8ea431e374106ffbf075c8e3c90 /llvm/lib/Remarks
parentb89f483064716be015d74e6ed3e0b09f9d925c30 (diff)
downloadllvm-064a08cd955019da9130f1109bfa534e79b8ec7c.zip
llvm-064a08cd955019da9130f1109bfa534e79b8ec7c.tar.gz
llvm-064a08cd955019da9130f1109bfa534e79b8ec7c.tar.bz2
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/lib/Remarks')
-rw-r--r--llvm/lib/Remarks/RemarkLinker.cpp2
-rw-r--r--llvm/lib/Remarks/RemarkParser.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Remarks/RemarkLinker.cpp b/llvm/lib/Remarks/RemarkLinker.cpp
index 33b408c..cbe9667 100644
--- a/llvm/lib/Remarks/RemarkLinker.cpp
+++ b/llvm/lib/Remarks/RemarkLinker.cpp
@@ -66,7 +66,7 @@ void RemarkLinker::setExternalFilePrependPath(StringRef PrependPathIn) {
}
// Discard remarks with no source location.
-static bool shouldKeepRemark(const Remark &R) { return R.Loc.hasValue(); }
+static bool shouldKeepRemark(const Remark &R) { return R.Loc.has_value(); }
Error RemarkLinker::link(StringRef Buffer, Optional<Format> RemarkFormat) {
if (!RemarkFormat) {
diff --git a/llvm/lib/Remarks/RemarkParser.cpp b/llvm/lib/Remarks/RemarkParser.cpp
index f36767e..fc0612f 100644
--- a/llvm/lib/Remarks/RemarkParser.cpp
+++ b/llvm/lib/Remarks/RemarkParser.cpp
@@ -118,7 +118,7 @@ struct CParser {
: createRemarkParser(ParserFormat, Buf))) {}
void handleError(Error E) { Err.emplace(toString(std::move(E))); }
- bool hasError() const { return Err.hasValue(); }
+ bool hasError() const { return Err.has_value(); }
const char *getMessage() const { return Err ? Err->c_str() : nullptr; };
};
} // namespace