[Lldb-commits] [lldb] 9721212 - [lldb][NFC] Fix code style of LibcxxVariantIndexValidity
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 10 03:38:32 PST 2020
Author: Raphael Isemann
Date: 2020-02-10T12:37:51+01:00
New Revision: 97212121c504aa9e028b1b4f2778696cc741e982
URL: https://github.com/llvm/llvm-project/commit/97212121c504aa9e028b1b4f2778696cc741e982
DIFF: https://github.com/llvm/llvm-project/commit/97212121c504aa9e028b1b4f2778696cc741e982.diff
LOG: [lldb][NFC] Fix code style of LibcxxVariantIndexValidity
Enum cases aren't all uppercase.
Added:
Modified:
lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
index a2b1733fa59f..da2e916a5b9b 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
@@ -60,10 +60,10 @@ using namespace lldb_private;
namespace {
// libc++ std::variant index could have one of three states
-// 1) VALID, we can obtain it and its not variant_npos
-// 2) INVALID, we can't obtain it or it is not a type we expect
-// 3) NPOS, its value is variant_npos which means the variant has no value
-enum class LibcxxVariantIndexValidity { VALID, INVALID, NPOS };
+// 1) Valid, we can obtain it and its not variant_npos
+// 2) Invalid, we can't obtain it or it is not a type we expect
+// 3) NPos, its value is variant_npos which means the variant has no value
+enum class LibcxxVariantIndexValidity { Valid, Invalid, NPos };
LibcxxVariantIndexValidity
LibcxxVariantGetIndexValidity(ValueObjectSP &impl_sp) {
@@ -71,14 +71,14 @@ LibcxxVariantGetIndexValidity(ValueObjectSP &impl_sp) {
impl_sp->GetChildMemberWithName(ConstString("__index"), true));
if (!index_sp)
- return LibcxxVariantIndexValidity::INVALID;
+ return LibcxxVariantIndexValidity::Invalid;
int64_t index_value = index_sp->GetValueAsSigned(0);
if (index_value == -1)
- return LibcxxVariantIndexValidity::NPOS;
+ return LibcxxVariantIndexValidity::NPos;
- return LibcxxVariantIndexValidity::VALID;
+ return LibcxxVariantIndexValidity::Valid;
}
llvm::Optional<uint64_t> LibcxxVariantIndexValue(ValueObjectSP &impl_sp) {
@@ -129,10 +129,10 @@ bool LibcxxVariantSummaryProvider(ValueObject &valobj, Stream &stream,
LibcxxVariantIndexValidity validity = LibcxxVariantGetIndexValidity(impl_sp);
- if (validity == LibcxxVariantIndexValidity::INVALID)
+ if (validity == LibcxxVariantIndexValidity::Invalid)
return false;
- if (validity == LibcxxVariantIndexValidity::NPOS) {
+ if (validity == LibcxxVariantIndexValidity::NPos) {
stream.Printf(" No Value");
return true;
}
@@ -196,10 +196,10 @@ bool VariantFrontEnd::Update() {
LibcxxVariantIndexValidity validity = LibcxxVariantGetIndexValidity(impl_sp);
- if (validity == LibcxxVariantIndexValidity::INVALID)
+ if (validity == LibcxxVariantIndexValidity::Invalid)
return false;
- if (validity == LibcxxVariantIndexValidity::NPOS)
+ if (validity == LibcxxVariantIndexValidity::NPos)
return true;
m_size = 1;
More information about the lldb-commits
mailing list