[llvm] cb31997 - [Support] Use std::optional in ToolOutputFile.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 14:16:29 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T14:16:11-08:00
New Revision: cb31997beb77c14ac23a0c593eee7487b9721b17
URL: https://github.com/llvm/llvm-project/commit/cb31997beb77c14ac23a0c593eee7487b9721b17
DIFF: https://github.com/llvm/llvm-project/commit/cb31997beb77c14ac23a0c593eee7487b9721b17.diff
LOG: [Support] Use std::optional in ToolOutputFile.h (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Added:
Modified:
llvm/include/llvm/Support/ToolOutputFile.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/ToolOutputFile.h b/llvm/include/llvm/Support/ToolOutputFile.h
index 9930e0b90311..00625b52172b 100644
--- a/llvm/include/llvm/Support/ToolOutputFile.h
+++ b/llvm/include/llvm/Support/ToolOutputFile.h
@@ -15,6 +15,7 @@
#include "llvm/ADT/Optional.h"
#include "llvm/Support/raw_ostream.h"
+#include <optional>
namespace llvm {
@@ -43,7 +44,7 @@ class ToolOutputFile {
/// Storage for the stream, if we're owning our own stream. This is
/// intentionally declared after Installer.
- Optional<raw_fd_ostream> OSHolder;
+ std::optional<raw_fd_ostream> OSHolder;
/// The actual stream to use.
raw_fd_ostream *OS;
More information about the llvm-commits
mailing list