[NFC][AArch64] Explicitly define undefined bits for instructions (#122129)
[llvm-project.git] / lldb / source / Plugins / Platform / MacOSX / PlatformDarwinDevice.h
blobe1eba08fb558439904f7138d840e46ea2317e190
1 //===-- PlatformDarwinDevice.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-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
12 #include "PlatformDarwin.h"
14 #include "llvm/ADT/StringRef.h"
16 #include <string>
18 namespace lldb_private {
20 /// Abstract Darwin platform with a potential device support directory.
21 class PlatformDarwinDevice : public PlatformDarwin {
22 public:
23 using PlatformDarwin::PlatformDarwin;
24 ~PlatformDarwinDevice() override;
26 protected:
27 virtual Status GetSharedModuleWithLocalCache(
28 const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
29 const FileSpecList *module_search_paths_ptr,
30 llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules, bool *did_create_ptr);
32 struct SDKDirectoryInfo {
33 SDKDirectoryInfo(const FileSpec &sdk_dir_spec);
34 FileSpec directory;
35 ConstString build;
36 llvm::VersionTuple version;
37 bool user_cached;
40 typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
42 bool UpdateSDKDirectoryInfosIfNeeded();
44 const SDKDirectoryInfo *GetSDKDirectoryForLatestOSVersion();
45 const SDKDirectoryInfo *GetSDKDirectoryForCurrentOSVersion();
47 static FileSystem::EnumerateDirectoryResult
48 GetContainedFilesIntoVectorOfStringsCallback(void *baton,
49 llvm::sys::fs::file_type ft,
50 llvm::StringRef path);
52 const char *GetDeviceSupportDirectory();
53 const char *GetDeviceSupportDirectoryForOSVersion();
55 virtual llvm::StringRef GetPlatformName() = 0;
56 virtual llvm::StringRef GetDeviceSupportDirectoryName() = 0;
58 std::mutex m_sdk_dir_mutex;
59 SDKDirectoryInfoCollection m_sdk_directory_infos;
61 private:
62 std::string m_device_support_directory;
63 std::string m_device_support_directory_for_os_version;
65 } // namespace lldb_private
67 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H