summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorDawn Perchik <dawn@burble.org>2015-10-07 22:01:12 +0000
committerDawn Perchik <dawn@burble.org>2015-10-07 22:01:12 +0000
commit1bbaede5b9054779c8715bf559804be412b487f9 (patch)
tree27512304b9ed990384b3924558dc1197de6f86d2 /lldb/source/Commands/CommandObjectExpression.cpp
parent6df48a97d2cee06e065d67f2da23db3d843d4b57 (diff)
downloadbcm5719-llvm-1bbaede5b9054779c8715bf559804be412b487f9.tar.gz
bcm5719-llvm-1bbaede5b9054779c8715bf559804be412b487f9.zip
Decide on the expression language inside UserExpression
When the target settings are consulted to decide the expression language is decided in CommandObjectExpression, this doesn't help if you're running SBFrame::EvaluateExpression(). Moving the logic into UserExpression fixes this. Based on patch from scallanan@apple.com Reviewed by: dawn Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13267 llvm-svn: 249624
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 3dd962b413b..ec23717c77f 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -299,16 +299,7 @@ CommandObjectExpression::EvaluateExpression
options.SetUseDynamic(m_varobj_options.use_dynamic);
options.SetTryAllThreads(m_command_options.try_all_threads);
options.SetDebug(m_command_options.debug);
-
- // If the language was not specified in the expression command,
- // set it to the language in the target's properties if
- // specified, else default to the language for the frame.
- if (m_command_options.language != eLanguageTypeUnknown)
- options.SetLanguage(m_command_options.language);
- else if (target->GetLanguage() != eLanguageTypeUnknown)
- options.SetLanguage(target->GetLanguage());
- else if (frame)
- options.SetLanguage(frame->GetLanguage());
+ options.SetLanguage(m_command_options.language);
// If there is any chance we are going to stop and want to see
// what went wrong with our expression, we should generate debug info
OpenPOWER on IntegriCloud