[llvm] c789e4a - [Native] Use std::optional in NativeTypeEnum.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 11:56:03 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T11:55:58-08:00
New Revision: c789e4a746069e5cd006d040e11d657816fa14ef
URL: https://github.com/llvm/llvm-project/commit/c789e4a746069e5cd006d040e11d657816fa14ef
DIFF: https://github.com/llvm/llvm-project/commit/c789e4a746069e5cd006d040e11d657816fa14ef.diff
LOG: [Native] Use std::optional in NativeTypeEnum.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
Added:
Modified:
llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
index ec37d276e66b4..eb6f7fe710dd9 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
@@ -20,6 +20,7 @@
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
#include <cassert>
+#include <optional>
using namespace llvm;
using namespace llvm::codeview;
@@ -54,7 +55,7 @@ class NativeEnumEnumEnumerators : public IPDBEnumSymbols, TypeVisitorCallbacks {
NativeSession &Session;
const NativeTypeEnum &ClassParent;
std::vector<EnumeratorRecord> Enumerators;
- Optional<TypeIndex> ContinuationIndex;
+ std::optional<TypeIndex> ContinuationIndex;
uint32_t Index = 0;
};
} // namespace
More information about the llvm-commits
mailing list