[llvm] d5987fe - [DWARFLinker] Use std::optional in DWARFLinkerCompileUnit.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 08:19:41 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T08:19:36-08:00
New Revision: d5987fe324fcaedcea12914d6f9644cc5329f364
URL: https://github.com/llvm/llvm-project/commit/d5987fe324fcaedcea12914d6f9644cc5329f364
DIFF: https://github.com/llvm/llvm-project/commit/d5987fe324fcaedcea12914d6f9644cc5329f364.diff
LOG: [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
Added:
Modified:
llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
Removed:
################################################################################
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 <optional>
namespace llvm {
@@ -243,7 +244,7 @@ class CompileUnit {
DWARFUnit &OrigUnit;
unsigned ID;
std::vector<DIEInfo> Info; ///< DIE info indexed by DIE index.
- Optional<BasicDIEUnit> NewUnit;
+ std::optional<BasicDIEUnit> NewUnit;
MCSymbol *LabelBegin = nullptr;
uint64_t StartOffset;
More information about the llvm-commits
mailing list