1 //===--- DarwinSDKInfo.h - SDK Information parser for darwin ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
11 #define LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
13 #include "clang/Basic/LLVM.h"
14 #include "llvm/Support/Error.h"
15 #include "llvm/Support/VersionTuple.h"
16 #include "llvm/Support/VirtualFileSystem.h"
21 /// The information about the darwin SDK that was used during this compilation.
24 DarwinSDKInfo(llvm::VersionTuple Version) : Version(Version) {}
26 const llvm::VersionTuple &getVersion() const { return Version; }
29 llvm::VersionTuple Version;
32 /// Parse the SDK information from the SDKSettings.json file.
34 /// \returns an error if the SDKSettings.json file is invalid, None if the
35 /// SDK has no SDKSettings.json, or a valid \c DarwinSDKInfo otherwise.
36 Expected<Optional<DarwinSDKInfo>> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS,
37 StringRef SDKRootPath);
39 } // end namespace driver
40 } // end namespace clang
42 #endif // LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H