1 //===--- DarwinSDKInfo.h - SDK Information parser for darwin ----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
10 #define LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
12 #include "clang/Basic/LLVM.h"
13 #include "llvm/Support/Error.h"
14 #include "llvm/Support/VersionTuple.h"
15 #include "llvm/Support/VirtualFileSystem.h"
20 /// The information about the darwin SDK that was used during this compilation.
23 DarwinSDKInfo(llvm::VersionTuple Version) : Version(Version) {}
25 const llvm::VersionTuple &getVersion() const { return Version; }
28 llvm::VersionTuple Version;
31 /// Parse the SDK information from the SDKSettings.json file.
33 /// \returns an error if the SDKSettings.json file is invalid, None if the
34 /// SDK has no SDKSettings.json, or a valid \c DarwinSDKInfo otherwise.
35 Expected<Optional<DarwinSDKInfo>> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS,
36 StringRef SDKRootPath);
38 } // end namespace driver
39 } // end namespace clang
41 #endif // LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H