[Lldb-commits] [lldb] d151ad6 - [lldb] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#139395)
via lldb-commits
lldb-commits at lists.llvm.org
Sat May 10 11:03:12 PDT 2025
Author: Kazu Hirata
Date: 2025-05-10T11:03:09-07:00
New Revision: d151ad650ccbab752f9c10c191dac24593e8198a
URL: https://github.com/llvm/llvm-project/commit/d151ad650ccbab752f9c10c191dac24593e8198a
DIFF: https://github.com/llvm/llvm-project/commit/d151ad650ccbab752f9c10c191dac24593e8198a.diff
LOG: [lldb] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#139395)
Added:
Modified:
lldb/source/API/SBSaveCoreOptions.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
Removed:
################################################################################
diff --git a/lldb/source/API/SBSaveCoreOptions.cpp b/lldb/source/API/SBSaveCoreOptions.cpp
index e101f6a25783c..15584abaac013 100644
--- a/lldb/source/API/SBSaveCoreOptions.cpp
+++ b/lldb/source/API/SBSaveCoreOptions.cpp
@@ -129,5 +129,5 @@ uint64_t SBSaveCoreOptions::GetCurrentSizeInBytes(SBError &error) {
}
lldb_private::SaveCoreOptions &SBSaveCoreOptions::ref() const {
- return *m_opaque_up.get();
+ return *m_opaque_up;
}
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
index d8d519693f102..ea763b94fcc75 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -344,7 +344,7 @@ class ClangExpressionDeclMap : public ClangASTSource {
/// Activate parser-specific variables
void EnableParserVars() {
- if (!m_parser_vars.get())
+ if (!m_parser_vars)
m_parser_vars = std::make_unique<ParserVars>();
}
@@ -371,7 +371,7 @@ class ClangExpressionDeclMap : public ClangASTSource {
/// Activate struct variables
void EnableStructVars() {
- if (!m_struct_vars.get())
+ if (!m_struct_vars)
m_struct_vars.reset(new struct StructVars);
}
More information about the lldb-commits
mailing list