[llvm] 88e41b4 - [Support] Use std::optional in InitLLVM.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 14:16:26 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T14:16:08-08:00
New Revision: 88e41b42f8d0abab4488b08f9d88d8e014d7f537
URL: https://github.com/llvm/llvm-project/commit/88e41b42f8d0abab4488b08f9d88d8e014d7f537
DIFF: https://github.com/llvm/llvm-project/commit/88e41b42f8d0abab4488b08f9d88d8e014d7f537.diff
LOG: [Support] Use std::optional in InitLLVM.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/InitLLVM.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/InitLLVM.h b/llvm/include/llvm/Support/InitLLVM.h
index c82d0dcbc62b..0fa9cb8bbc43 100644
--- a/llvm/include/llvm/Support/InitLLVM.h
+++ b/llvm/include/llvm/Support/InitLLVM.h
@@ -13,6 +13,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/PrettyStackTrace.h"
+#include <optional>
// The main() functions in typical LLVM tools start with InitLLVM which does
// the following one-time initializations:
@@ -45,7 +46,7 @@ class InitLLVM {
private:
BumpPtrAllocator Alloc;
SmallVector<const char *, 0> Args;
- Optional<PrettyStackTraceProgram> StackPrinter;
+ std::optional<PrettyStackTraceProgram> StackPrinter;
};
} // namespace llvm
More information about the llvm-commits
mailing list