summaryrefslogtreecommitdiff
path: root/source/API/SBInitializerOptions.cpp
blob: 8d8ec28190ec1808acd1ff010fb3a172ffc72937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===-- SBInitializerOptions.cpp --------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/API/SBInitializerOptions.h"
#include "lldb/Initialization/SystemInitializer.h"

using namespace lldb;
using namespace lldb_private;

SBInitializerOptions::SBInitializerOptions(const SBInitializerOptions &rhs) {
  m_opaque_up.reset(new InitializerOptions());
  *(m_opaque_up.get()) = rhs.ref();
}

const SBInitializerOptions &SBInitializerOptions::
operator=(const SBInitializerOptions &rhs) {
  if (this != &rhs) {
    this->ref() = rhs.ref();
  }
  return *this;
}

SBInitializerOptions::~SBInitializerOptions() {}

SBInitializerOptions::SBInitializerOptions() {
  m_opaque_up.reset(new InitializerOptions());
}

void SBInitializerOptions::SetCaptureReproducer(bool b) {
  m_opaque_up->reproducer_capture = b;
}

void SBInitializerOptions::SetReplayReproducer(bool b) {
  m_opaque_up->reproducer_replay = b;
}

void SBInitializerOptions::SetReproducerPath(const char *path) {
  m_opaque_up->reproducer_path = path;
}

InitializerOptions &SBInitializerOptions::ref() const {
  return *(m_opaque_up.get());
}