1 //===-- SystemInitializerLLGS.cpp -------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "SystemInitializerLLGS.h" 10 11 #if defined(__APPLE__) 12 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" 13 using HostObjectFile = ObjectFileMachO; 14 #elif defined(_WIN32) 15 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" 16 using HostObjectFile = ObjectFilePECOFF; 17 #else 18 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" 19 using HostObjectFile = ObjectFileELF; 20 #endif 21 22 using namespace lldb_private; 23 24 llvm::Error 25 SystemInitializerLLGS::Initialize(const InitializerOptions &options) { 26 if (auto e = SystemInitializerCommon::Initialize(options)) 27 return e; 28 29 HostObjectFile::Initialize(); 30 31 return llvm::Error::success(); 32 } 33 34 void SystemInitializerLLGS::Terminate() { 35 HostObjectFile::Terminate(); 36 SystemInitializerCommon::Terminate(); 37 } 38