clang  8.0.0
DarwinSDKInfo.h
Go to the documentation of this file.
1 //===--- DarwinSDKInfo.h - SDK Information parser for darwin ----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
11 #define LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
12 
13 #include "clang/Basic/LLVM.h"
14 #include "llvm/Support/Error.h"
15 #include "llvm/Support/VersionTuple.h"
16 #include "llvm/Support/VirtualFileSystem.h"
17 
18 namespace clang {
19 namespace driver {
20 
21 /// The information about the darwin SDK that was used during this compilation.
23 public:
24  DarwinSDKInfo(llvm::VersionTuple Version) : Version(Version) {}
25 
26  const llvm::VersionTuple &getVersion() const { return Version; }
27 
28 private:
29  llvm::VersionTuple Version;
30 };
31 
32 /// Parse the SDK information from the SDKSettings.json file.
33 ///
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);
38 
39 } // end namespace driver
40 } // end namespace clang
41 
42 #endif // LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
The information about the darwin SDK that was used during this compilation.
Definition: DarwinSDKInfo.h:22
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
const llvm::VersionTuple & getVersion() const
Definition: DarwinSDKInfo.h:26
Expected< Optional< DarwinSDKInfo > > parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath)
Parse the SDK information from the SDKSettings.json file.
Dataflow Directional Tag Classes.
DarwinSDKInfo(llvm::VersionTuple Version)
Definition: DarwinSDKInfo.h:24