Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163239 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBFrame.cpp b/source/API/SBFrame.cpp
index ca45191..b94a0ce 100644
--- a/source/API/SBFrame.cpp
+++ b/source/API/SBFrame.cpp
@@ -1082,17 +1082,14 @@
             Host::SetCrashDescriptionWithFormat ("SBFrame::EvaluateExpression (expr = \"%s\", fetch_dynamic_value = %u) %s",
                                                  expr, fetch_dynamic_value, frame_description.GetString().c_str());
 #endif
-            const bool coerce_to_id = false;
-            const bool keep_in_memory = false;
-
+            Target::EvaluateExpressionOptions options;
+            options.SetUnwindOnError(unwind_on_error)
+            .SetUseDynamic(fetch_dynamic_value);
+            
             exe_results = target->EvaluateExpression (expr, 
                                                       frame,
-                                                      eExecutionPolicyOnlyWhenNeeded,
-                                                      coerce_to_id,
-                                                      unwind_on_error, 
-                                                      keep_in_memory, 
-                                                      fetch_dynamic_value, 
-                                                      expr_value_sp);
+                                                      expr_value_sp,
+                                                      options);
             expr_result.SetSP(expr_value_sp);
 #ifdef LLDB_CONFIGURATION_DEBUG
             Host::SetCrashDescription (NULL);
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index 21f24a2..46f5e07 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -732,14 +732,12 @@
             Target* target = exe_ctx.GetTargetPtr();
             if (target)
             {
+                Target::EvaluateExpressionOptions options;
+                options.SetKeepInMemory(true);
                 target->EvaluateExpression (expression,
                                             exe_ctx.GetFramePtr(),
-                                            eExecutionPolicyOnlyWhenNeeded,
-                                            false, // coerce to id
-                                            true, // unwind on error
-                                            true, // keep in memory
-                                            eNoDynamicValues,
-                                            new_value_sp);
+                                            new_value_sp,
+                                            options);
                 if (new_value_sp)
                 {
                     new_value_sp->SetName(ConstString(name));