80 lines · c
1//===-- PlatformMacOSX.h ----------------------------------------*- 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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H10#define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H11 12#include "PlatformDarwinDevice.h"13#include "lldb/Target/Platform.h"14#include "lldb/Utility/ConstString.h"15#include "lldb/Utility/Status.h"16#include "lldb/Utility/XcodeSDK.h"17#include "lldb/lldb-forward.h"18#include "llvm/ADT/SmallVector.h"19#include "llvm/ADT/StringRef.h"20 21#include <vector>22 23namespace lldb_private {24class ArchSpec;25class FileSpec;26class FileSpecList;27class ModuleSpec;28class Process;29class Target;30 31class PlatformMacOSX : public PlatformDarwinDevice {32public:33 PlatformMacOSX();34 35 static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);36 37 static void Initialize();38 39 static void Terminate();40 41 static llvm::StringRef GetPluginNameStatic() {42 return Platform::GetHostPlatformName();43 }44 45 static llvm::StringRef GetDescriptionStatic();46 47 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }48 49 Status GetSharedModule(const ModuleSpec &module_spec, Process *process,50 lldb::ModuleSP &module_sp,51 llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules,52 bool *did_create_ptr) override;53 54 llvm::StringRef GetDescription() override { return GetDescriptionStatic(); }55 56 Status GetFile(const FileSpec &source, const FileSpec &destination) override {57 return PlatformDarwin::GetFile(source, destination);58 }59 60 std::vector<ArchSpec>61 GetSupportedArchitectures(const ArchSpec &process_host_arch) override;62 63 ConstString GetSDKDirectory(Target &target) override;64 65 void66 AddClangModuleCompilationOptions(Target *target,67 std::vector<std::string> &options) override {68 return PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(69 target, options, XcodeSDK::Type::MacOSX);70 }71 72protected:73 llvm::StringRef GetDeviceSupportDirectoryName() override;74 llvm::StringRef GetPlatformName() override;75};76 77} // namespace lldb_private78 79#endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H80