From d5987fe324fcaedcea12914d6f9644cc5329f364 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 10 Dec 2022 08:19:36 -0800 Subject: [PATCH] [DWARFLinker] Use std::optional in DWARFLinkerCompileUnit.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 --- llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h b/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h index 05e291c05132..94ac62243647 100644 --- a/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h +++ b/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h @@ -13,6 +13,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/CodeGen/DIE.h" #include "llvm/DebugInfo/DWARF/DWARFUnit.h" +#include namespace llvm { @@ -243,7 +244,7 @@ private: DWARFUnit &OrigUnit; unsigned ID; std::vector Info; ///< DIE info indexed by DIE index. - Optional NewUnit; + std::optional NewUnit; MCSymbol *LabelBegin = nullptr; uint64_t StartOffset; -- 2.34.1