[Lldb-commits] [lldb] r368309 - [lldb][NFC] Simplify return in MaybeHandleVariable
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 8 09:41:32 PDT 2019
Author: teemperor
Date: Thu Aug 8 09:41:32 2019
New Revision: 368309
URL: http://llvm.org/viewvc/llvm-project?rev=368309&view=rev
Log:
[lldb][NFC] Simplify return in MaybeHandleVariable
This function anyway returns true, no need to do this extra work.
Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=368309&r1=368308&r2=368309&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Thu Aug 8 09:41:32 2019
@@ -1387,15 +1387,10 @@ bool IRForTarget::MaybeHandleVariable(Va
PrintType(value_type).c_str(), *value_size, value_alignment);
}
- if (named_decl &&
- !m_decl_map->AddValueToStruct(
- named_decl, lldb_private::ConstString(name.c_str()), llvm_value_ptr,
- *value_size, value_alignment)) {
- if (!global_variable->hasExternalLinkage())
- return true;
- else
- return true;
- }
+ if (named_decl)
+ m_decl_map->AddValueToStruct(
+ named_decl, lldb_private::ConstString(name.c_str()), llvm_value_ptr,
+ *value_size, value_alignment);
} else if (dyn_cast<llvm::Function>(llvm_value_ptr)) {
if (log)
LLDB_LOGF(log, "Function pointers aren't handled right now");
More information about the lldb-commits
mailing list