summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ExpressionSourceCode.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-07-07 18:25:48 +0000
committerJim Ingham <jingham@apple.com>2016-07-07 18:25:48 +0000
commitbed6779c7a839ed6dab85d0198e105021b63552f (patch)
tree41a5ed593b0c868d9565b5c8364386f92513f906 /lldb/source/Expression/ExpressionSourceCode.cpp
parentf39977112a2ecc545d6d89a9875f6a35a54f68e6 (diff)
downloadbcm5719-llvm-bed6779c7a839ed6dab85d0198e105021b63552f.tar.gz
bcm5719-llvm-bed6779c7a839ed6dab85d0198e105021b63552f.zip
Add an "experimental" setting to disable injecting local variables into expressions.
This feature was added to solve a lookup problem in expressions when local variables shadow ivars. That solution requires fully realizing all local variables to evaluate any expression, and can cause significant performance problems when evaluating expressions in frames that have many complex locals. Until we get a better solution, this setting mitigates the problem when you don't have local variables that shadow ivars. <rdar://problem/27226122> llvm-svn: 274783
Diffstat (limited to 'lldb/source/Expression/ExpressionSourceCode.cpp')
-rw-r--r--lldb/source/Expression/ExpressionSourceCode.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp
index d82ed608407..2d41d1a8b44 100644
--- a/lldb/source/Expression/ExpressionSourceCode.cpp
+++ b/lldb/source/Expression/ExpressionSourceCode.cpp
@@ -200,7 +200,8 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi
const char *target_specific_defines = "typedef signed char BOOL;\n";
std::string module_macros;
- if (Target *target = exe_ctx.GetTargetPtr())
+ Target *target = exe_ctx.GetTargetPtr();
+ if (target)
{
if (target->GetArchitecture().GetMachine() == llvm::Triple::aarch64)
{
@@ -278,8 +279,11 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi
ConstString object_name;
if (Language::LanguageIsCPlusPlus(frame->GetLanguage()))
{
- lldb::VariableListSP var_list_sp = frame->GetInScopeVariableList(false, true);
- AddLocalVariableDecls(var_list_sp, lldb_local_var_decls);
+ if (target->GetInjectLocalVariables(&exe_ctx))
+ {
+ lldb::VariableListSP var_list_sp = frame->GetInScopeVariableList(false, true);
+ AddLocalVariableDecls(var_list_sp, lldb_local_var_decls);
+ }
}
}
OpenPOWER on IntegriCloud