1*b5893f02SDimitry Andric //===-- SBInitializerOptions.cpp --------------------------------*- C++ -*-===// 2*b5893f02SDimitry Andric // 3*b5893f02SDimitry Andric // The LLVM Compiler Infrastructure 4*b5893f02SDimitry Andric // 5*b5893f02SDimitry Andric // This file is distributed under the University of Illinois Open Source 6*b5893f02SDimitry Andric // License. See LICENSE.TXT for details. 7*b5893f02SDimitry Andric // 8*b5893f02SDimitry Andric //===----------------------------------------------------------------------===// 9*b5893f02SDimitry Andric 10*b5893f02SDimitry Andric #include "lldb/API/SBInitializerOptions.h" 11*b5893f02SDimitry Andric #include "lldb/Initialization/SystemInitializer.h" 12*b5893f02SDimitry Andric 13*b5893f02SDimitry Andric using namespace lldb; 14*b5893f02SDimitry Andric using namespace lldb_private; 15*b5893f02SDimitry Andric SBInitializerOptions(const SBInitializerOptions & rhs)16*b5893f02SDimitry AndricSBInitializerOptions::SBInitializerOptions(const SBInitializerOptions &rhs) { 17*b5893f02SDimitry Andric m_opaque_up.reset(new InitializerOptions()); 18*b5893f02SDimitry Andric *(m_opaque_up.get()) = rhs.ref(); 19*b5893f02SDimitry Andric } 20*b5893f02SDimitry Andric 21*b5893f02SDimitry Andric const SBInitializerOptions &SBInitializerOptions:: operator =(const SBInitializerOptions & rhs)22*b5893f02SDimitry Andricoperator=(const SBInitializerOptions &rhs) { 23*b5893f02SDimitry Andric if (this != &rhs) { 24*b5893f02SDimitry Andric this->ref() = rhs.ref(); 25*b5893f02SDimitry Andric } 26*b5893f02SDimitry Andric return *this; 27*b5893f02SDimitry Andric } 28*b5893f02SDimitry Andric ~SBInitializerOptions()29*b5893f02SDimitry AndricSBInitializerOptions::~SBInitializerOptions() {} 30*b5893f02SDimitry Andric SBInitializerOptions()31*b5893f02SDimitry AndricSBInitializerOptions::SBInitializerOptions() { 32*b5893f02SDimitry Andric m_opaque_up.reset(new InitializerOptions()); 33*b5893f02SDimitry Andric } 34*b5893f02SDimitry Andric SetCaptureReproducer(bool b)35*b5893f02SDimitry Andricvoid SBInitializerOptions::SetCaptureReproducer(bool b) { 36*b5893f02SDimitry Andric m_opaque_up->reproducer_capture = b; 37*b5893f02SDimitry Andric } 38*b5893f02SDimitry Andric SetReplayReproducer(bool b)39*b5893f02SDimitry Andricvoid SBInitializerOptions::SetReplayReproducer(bool b) { 40*b5893f02SDimitry Andric m_opaque_up->reproducer_replay = b; 41*b5893f02SDimitry Andric } 42*b5893f02SDimitry Andric SetReproducerPath(const char * path)43*b5893f02SDimitry Andricvoid SBInitializerOptions::SetReproducerPath(const char *path) { 44*b5893f02SDimitry Andric m_opaque_up->reproducer_path = path; 45*b5893f02SDimitry Andric } 46*b5893f02SDimitry Andric ref() const47*b5893f02SDimitry AndricInitializerOptions &SBInitializerOptions::ref() const { 48*b5893f02SDimitry Andric return *(m_opaque_up.get()); 49*b5893f02SDimitry Andric } 50