aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-04-14 21:41:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-06-22 18:20:56 +0000
commitbdd1243df58e60e85101c09001d9812a789b6bc4 (patch)
treea1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp
parent781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff)
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp b/contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp
index f7e2aa4e9a35..8fbc33328de8 100644
--- a/contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp
+++ b/contrib/llvm-project/llvm/lib/IR/LLVMRemarkStreamer.cpp
@@ -18,6 +18,7 @@
#include "llvm/Remarks/RemarkStreamer.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ToolOutputFile.h"
+#include <optional>
using namespace llvm;
@@ -45,10 +46,10 @@ static remarks::Type toRemarkType(enum DiagnosticKind Kind) {
}
/// DiagnosticLocation -> remarks::RemarkLocation.
-static Optional<remarks::RemarkLocation>
+static std::optional<remarks::RemarkLocation>
toRemarkLocation(const DiagnosticLocation &DL) {
if (!DL.isValid())
- return None;
+ return std::nullopt;
StringRef File = DL.getRelativePath();
unsigned Line = DL.getLine();
unsigned Col = DL.getColumn();
@@ -94,7 +95,7 @@ char LLVMRemarkSetupFormatError::ID = 0;
Expected<std::unique_ptr<ToolOutputFile>> llvm::setupLLVMOptimizationRemarks(
LLVMContext &Context, StringRef RemarksFilename, StringRef RemarksPasses,
StringRef RemarksFormat, bool RemarksWithHotness,
- Optional<uint64_t> RemarksHotnessThreshold) {
+ std::optional<uint64_t> RemarksHotnessThreshold) {
if (RemarksWithHotness)
Context.setDiagnosticsHotnessRequested(true);
@@ -141,7 +142,7 @@ Expected<std::unique_ptr<ToolOutputFile>> llvm::setupLLVMOptimizationRemarks(
Error llvm::setupLLVMOptimizationRemarks(
LLVMContext &Context, raw_ostream &OS, StringRef RemarksPasses,
StringRef RemarksFormat, bool RemarksWithHotness,
- Optional<uint64_t> RemarksHotnessThreshold) {
+ std::optional<uint64_t> RemarksHotnessThreshold) {
if (RemarksWithHotness)
Context.setDiagnosticsHotnessRequested(true);