[Lldb-commits] [lldb] r279896 - Fixed the location of a conditional to make the following code clearer.
Sean Callanan via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 26 17:35:37 PDT 2016
Author: spyffe
Date: Fri Aug 26 19:35:37 2016
New Revision: 279896
URL: http://llvm.org/viewvc/llvm-project?rev=279896&view=rev
Log:
Fixed the location of a conditional to make the following code clearer.
Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=279896&r1=279895&r2=279896&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Fri Aug 26 19:35:37 2016
@@ -882,9 +882,15 @@ ClangExpressionParser::PrepareForExecuti
bool ir_can_run = ir_for_target.runOnModule(*execution_unit_sp->GetModule());
+ if (!ir_can_run)
+ {
+ err.SetErrorString("The expression could not be prepared to run in the target");
+ return err;
+ }
+
Process *process = exe_ctx.GetProcessPtr();
- if (execution_policy != eExecutionPolicyAlways && execution_policy != eExecutionPolicyTopLevel && ir_can_run)
+ if (execution_policy != eExecutionPolicyAlways && execution_policy != eExecutionPolicyTopLevel)
{
lldb_private::Error interpret_error;
@@ -900,12 +906,6 @@ ClangExpressionParser::PrepareForExecuti
}
}
- if (!ir_can_run)
- {
- err.SetErrorString("The expression could not be prepared to run in the target");
- return err;
- }
-
if (!process && execution_policy == eExecutionPolicyAlways)
{
err.SetErrorString("Expression needed to run in the target, but the target can't be run");
More information about the lldb-commits
mailing list