[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).
This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).
Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73258
2020-01-24 15:23:27 +08:00
|
|
|
//===-- SBExpressionOptions.cpp -------------------------------------------===//
|
2012-10-17 05:41:58 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2012-10-17 05:41:58 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lldb/API/SBExpressionOptions.h"
|
2019-03-06 08:05:55 +08:00
|
|
|
#include "Utils.h"
|
2012-10-17 05:41:58 +08:00
|
|
|
#include "lldb/API/SBStream.h"
|
|
|
|
#include "lldb/Target/Target.h"
|
2022-01-20 03:38:26 +08:00
|
|
|
#include "lldb/Utility/Instrumentation.h"
|
2012-10-17 05:41:58 +08:00
|
|
|
|
|
|
|
using namespace lldb;
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::SBExpressionOptions()
|
2019-03-06 08:06:00 +08:00
|
|
|
: m_opaque_up(new EvaluateExpressionOptions()) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
}
|
2012-10-17 05:41:58 +08:00
|
|
|
|
2022-01-03 14:44:15 +08:00
|
|
|
SBExpressionOptions::SBExpressionOptions(const SBExpressionOptions &rhs) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-03-06 08:05:55 +08:00
|
|
|
m_opaque_up = clone(rhs.m_opaque_up);
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const SBExpressionOptions &SBExpressionOptions::
|
|
|
|
operator=(const SBExpressionOptions &rhs) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-03-06 08:05:55 +08:00
|
|
|
if (this != &rhs)
|
|
|
|
m_opaque_up = clone(rhs.m_opaque_up);
|
2022-01-10 14:54:08 +08:00
|
|
|
return *this;
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2020-02-18 14:57:06 +08:00
|
|
|
SBExpressionOptions::~SBExpressionOptions() = default;
|
2012-10-17 05:41:58 +08:00
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
bool SBExpressionOptions::GetCoerceResultToId() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->DoesCoerceToId();
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
void SBExpressionOptions::SetCoerceResultToId(bool coerce) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, coerce);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetCoerceToId(coerce);
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
bool SBExpressionOptions::GetUnwindOnError() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->DoesUnwindOnError();
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetUnwindOnError(bool unwind) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, unwind);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetUnwindOnError(unwind);
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2013-01-15 10:47:48 +08:00
|
|
|
bool SBExpressionOptions::GetIgnoreBreakpoints() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->DoesIgnoreBreakpoints();
|
2013-01-15 10:47:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetIgnoreBreakpoints(bool ignore) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, ignore);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetIgnoreBreakpoints(ignore);
|
2013-01-15 10:47:48 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
lldb::DynamicValueType SBExpressionOptions::GetFetchDynamicValue() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetUseDynamic();
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
void SBExpressionOptions::SetFetchDynamicValue(lldb::DynamicValueType dynamic) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, dynamic);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetUseDynamic(dynamic);
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
uint32_t SBExpressionOptions::GetTimeoutInMicroSeconds() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetTimeout() ? m_opaque_up->GetTimeout()->count() : 0;
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
void SBExpressionOptions::SetTimeoutInMicroSeconds(uint32_t timeout) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, timeout);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetTimeout(timeout == 0 ? Timeout<std::micro>(llvm::None)
|
2016-12-06 19:24:51 +08:00
|
|
|
: std::chrono::microseconds(timeout));
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2014-03-29 05:58:28 +08:00
|
|
|
uint32_t SBExpressionOptions::GetOneThreadTimeoutInMicroSeconds() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetOneThreadTimeout()
|
|
|
|
? m_opaque_up->GetOneThreadTimeout()->count()
|
|
|
|
: 0;
|
2014-03-29 05:58:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetOneThreadTimeoutInMicroSeconds(uint32_t timeout) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, timeout);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetOneThreadTimeout(timeout == 0
|
2016-12-06 19:24:51 +08:00
|
|
|
? Timeout<std::micro>(llvm::None)
|
|
|
|
: std::chrono::microseconds(timeout));
|
2014-03-29 05:58:28 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
bool SBExpressionOptions::GetTryAllThreads() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetTryAllThreads();
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
void SBExpressionOptions::SetTryAllThreads(bool run_others) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, run_others);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetTryAllThreads(run_others);
|
2013-11-07 08:11:47 +08:00
|
|
|
}
|
|
|
|
|
2014-02-28 10:52:06 +08:00
|
|
|
bool SBExpressionOptions::GetStopOthers() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetStopOthers();
|
2014-02-28 10:52:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetStopOthers(bool run_others) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, run_others);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetStopOthers(run_others);
|
2014-02-28 10:52:06 +08:00
|
|
|
}
|
|
|
|
|
2013-11-07 08:11:47 +08:00
|
|
|
bool SBExpressionOptions::GetTrapExceptions() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetTrapExceptions();
|
2013-11-07 08:11:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetTrapExceptions(bool trap_exceptions) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, trap_exceptions);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetTrapExceptions(trap_exceptions);
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2014-06-13 10:37:02 +08:00
|
|
|
void SBExpressionOptions::SetLanguage(lldb::LanguageType language) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, language);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetLanguage(language);
|
2014-06-13 10:37:02 +08:00
|
|
|
}
|
|
|
|
|
2014-05-05 10:26:40 +08:00
|
|
|
void SBExpressionOptions::SetCancelCallback(
|
|
|
|
lldb::ExpressionCancelCallback callback, void *baton) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, callback, baton);
|
2019-03-09 03:09:27 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetCancelCallback(callback, baton);
|
2014-05-05 10:26:40 +08:00
|
|
|
}
|
|
|
|
|
2014-07-11 09:03:57 +08:00
|
|
|
bool SBExpressionOptions::GetGenerateDebugInfo() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetGenerateDebugInfo();
|
2014-07-11 09:03:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetGenerateDebugInfo(bool b) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, b);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->SetGenerateDebugInfo(b);
|
2014-07-11 09:03:57 +08:00
|
|
|
}
|
|
|
|
|
2014-08-09 05:45:36 +08:00
|
|
|
bool SBExpressionOptions::GetSuppressPersistentResult() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetResultIsInternal();
|
2014-08-09 05:45:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetSuppressPersistentResult(bool b) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, b);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->SetResultIsInternal(b);
|
2014-08-09 05:45:36 +08:00
|
|
|
}
|
|
|
|
|
Allow expresions to have unique expression prefixes:
expr_options = lldb.SBExpressionOptions()
expr_options.SetPrefix('''
struct Foo {
int a;
int b;
int c;
}
'''
expr_result = frame.EvaluateExpression ("Foo foo = { 1, 2, 3}; foo", expr_options)
This fixed a current issue with ptr_refs, cstr_refs and malloc_info so that they can work. If expressions define their own types and then return expression results that use those types, those types get copied into the target's AST context so they persist and the expression results can be still printed and used in future expressions. Code was added to the expression parser to copy the context in which types are defined if they are used as the expression results. So in the case of types defined by expressions, they get defined in a lldb_expr function and that function and _all_ of its statements get copied. Many types of statements are not supported in this copy (array subscript, lambdas, etc) so this causes expressions to fail as they can't copy the result types. To work around this issue I have added code that allows expressions to specify an expression specific prefix. Then when you evaluate the expression you can pass the "expr_options" and have types that can be correctly copied out into the target. I added this as a way to work around an issue, but I also think it is nice to be allowed to specify an expression prefix that can be reused by many expressions, so this feature is very useful.
<rdar://problem/21130675>
llvm-svn: 238365
2015-05-28 06:32:39 +08:00
|
|
|
const char *SBExpressionOptions::GetPrefix() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetPrefix();
|
Allow expresions to have unique expression prefixes:
expr_options = lldb.SBExpressionOptions()
expr_options.SetPrefix('''
struct Foo {
int a;
int b;
int c;
}
'''
expr_result = frame.EvaluateExpression ("Foo foo = { 1, 2, 3}; foo", expr_options)
This fixed a current issue with ptr_refs, cstr_refs and malloc_info so that they can work. If expressions define their own types and then return expression results that use those types, those types get copied into the target's AST context so they persist and the expression results can be still printed and used in future expressions. Code was added to the expression parser to copy the context in which types are defined if they are used as the expression results. So in the case of types defined by expressions, they get defined in a lldb_expr function and that function and _all_ of its statements get copied. Many types of statements are not supported in this copy (array subscript, lambdas, etc) so this causes expressions to fail as they can't copy the result types. To work around this issue I have added code that allows expressions to specify an expression specific prefix. Then when you evaluate the expression you can pass the "expr_options" and have types that can be correctly copied out into the target. I added this as a way to work around an issue, but I also think it is nice to be allowed to specify an expression prefix that can be reused by many expressions, so this feature is very useful.
<rdar://problem/21130675>
llvm-svn: 238365
2015-05-28 06:32:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetPrefix(const char *prefix) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, prefix);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->SetPrefix(prefix);
|
Allow expresions to have unique expression prefixes:
expr_options = lldb.SBExpressionOptions()
expr_options.SetPrefix('''
struct Foo {
int a;
int b;
int c;
}
'''
expr_result = frame.EvaluateExpression ("Foo foo = { 1, 2, 3}; foo", expr_options)
This fixed a current issue with ptr_refs, cstr_refs and malloc_info so that they can work. If expressions define their own types and then return expression results that use those types, those types get copied into the target's AST context so they persist and the expression results can be still printed and used in future expressions. Code was added to the expression parser to copy the context in which types are defined if they are used as the expression results. So in the case of types defined by expressions, they get defined in a lldb_expr function and that function and _all_ of its statements get copied. Many types of statements are not supported in this copy (array subscript, lambdas, etc) so this causes expressions to fail as they can't copy the result types. To work around this issue I have added code that allows expressions to specify an expression specific prefix. Then when you evaluate the expression you can pass the "expr_options" and have types that can be correctly copied out into the target. I added this as a way to work around an issue, but I also think it is nice to be allowed to specify an expression prefix that can be reused by many expressions, so this feature is very useful.
<rdar://problem/21130675>
llvm-svn: 238365
2015-05-28 06:32:39 +08:00
|
|
|
}
|
2014-08-09 05:45:36 +08:00
|
|
|
|
2016-03-25 09:57:14 +08:00
|
|
|
bool SBExpressionOptions::GetAutoApplyFixIts() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetAutoApplyFixIts();
|
2016-03-25 09:57:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetAutoApplyFixIts(bool b) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, b);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->SetAutoApplyFixIts(b);
|
2016-03-25 09:57:14 +08:00
|
|
|
}
|
|
|
|
|
2020-04-06 17:08:12 +08:00
|
|
|
uint64_t SBExpressionOptions::GetRetriesWithFixIts() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2020-04-06 17:08:12 +08:00
|
|
|
|
|
|
|
return m_opaque_up->GetRetriesWithFixIts();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetRetriesWithFixIts(uint64_t retries) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, retries);
|
2020-04-06 17:08:12 +08:00
|
|
|
|
|
|
|
return m_opaque_up->SetRetriesWithFixIts(retries);
|
|
|
|
}
|
|
|
|
|
2016-03-29 05:20:05 +08:00
|
|
|
bool SBExpressionOptions::GetTopLevel() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetExecutionPolicy() == eExecutionPolicyTopLevel;
|
2016-03-29 05:20:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetTopLevel(bool b) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, b);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetExecutionPolicy(b ? eExecutionPolicyTopLevel
|
|
|
|
: m_opaque_up->default_execution_policy);
|
2016-03-29 05:20:05 +08:00
|
|
|
}
|
|
|
|
|
2018-11-03 07:42:40 +08:00
|
|
|
bool SBExpressionOptions::GetAllowJIT() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up->GetExecutionPolicy() != eExecutionPolicyNever;
|
2018-11-03 07:42:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void SBExpressionOptions::SetAllowJIT(bool allow) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, allow);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2019-02-13 14:25:41 +08:00
|
|
|
m_opaque_up->SetExecutionPolicy(allow ? m_opaque_up->default_execution_policy
|
|
|
|
: eExecutionPolicyNever);
|
2018-11-03 07:42:40 +08:00
|
|
|
}
|
|
|
|
|
2012-10-17 05:41:58 +08:00
|
|
|
EvaluateExpressionOptions *SBExpressionOptions::get() const {
|
2019-02-13 14:25:41 +08:00
|
|
|
return m_opaque_up.get();
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
EvaluateExpressionOptions &SBExpressionOptions::ref() const {
|
2019-02-13 14:25:41 +08:00
|
|
|
return *(m_opaque_up.get());
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|