From 56969279b9988594ac9a49e880d07c0dd6ba3a28 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 11:45:47 -0800 Subject: [PATCH] [DWARF] Use std::optional in DWARFFormValue.cpp (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/lib/DebugInfo/DWARF/DWARFFormValue.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp index 1fecd5e..bd8c9d6 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp @@ -25,6 +25,7 @@ #include #include #include +#include using namespace llvm; using namespace dwarf; @@ -635,7 +636,7 @@ Expected DWARFFormValue::getAsCString() const { return make_error("Unsupported form for string attribute", inconvertibleErrorCode()); uint64_t Offset = Value.uval; - Optional Index; + std::optional Index; if (Form == DW_FORM_GNU_str_index || Form == DW_FORM_strx || Form == DW_FORM_strx1 || Form == DW_FORM_strx2 || Form == DW_FORM_strx3 || Form == DW_FORM_strx4) { -- 2.7.4