[clang] NFC, move DarwinSDKInfo to lib/Basic
This is a preparation commit for https://reviews.llvm.org/D105958
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
|
||||
#define LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
|
||||
#ifndef LLVM_CLANG_BASIC_DARWIN_SDK_INFO_H
|
||||
#define LLVM_CLANG_BASIC_DARWIN_SDK_INFO_H
|
||||
|
||||
#include "clang/Basic/LLVM.h"
|
||||
#include "llvm/Support/Error.h"
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "llvm/Support/VirtualFileSystem.h"
|
||||
|
||||
namespace clang {
|
||||
namespace driver {
|
||||
|
||||
/// The information about the darwin SDK that was used during this compilation.
|
||||
class DarwinSDKInfo {
|
||||
@@ -35,7 +34,6 @@ private:
|
||||
Expected<Optional<DarwinSDKInfo>> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS,
|
||||
StringRef SDKRootPath);
|
||||
|
||||
} // end namespace driver
|
||||
} // end namespace clang
|
||||
|
||||
#endif // LLVM_CLANG_DRIVER_DARWIN_SDK_INFO_H
|
||||
#endif // LLVM_CLANG_BASIC_DARWIN_SDK_INFO_H
|
||||
@@ -42,6 +42,7 @@ add_clang_library(clangBasic
|
||||
CharInfo.cpp
|
||||
CodeGenOptions.cpp
|
||||
Cuda.cpp
|
||||
DarwinSDKInfo.cpp
|
||||
Diagnostic.cpp
|
||||
DiagnosticIDs.cpp
|
||||
DiagnosticOptions.cpp
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/Driver/DarwinSDKInfo.h"
|
||||
#include "clang/Basic/DarwinSDKInfo.h"
|
||||
#include "llvm/Support/ErrorOr.h"
|
||||
#include "llvm/Support/JSON.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
|
||||
using namespace clang::driver;
|
||||
using namespace clang;
|
||||
|
||||
Expected<Optional<DarwinSDKInfo>>
|
||||
driver::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath) {
|
||||
clang::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath) {
|
||||
llvm::SmallString<256> Filepath = SDKRootPath;
|
||||
llvm::sys::path::append(Filepath, "SDKSettings.json");
|
||||
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
|
||||
@@ -13,7 +13,6 @@ endif()
|
||||
add_clang_library(clangDriver
|
||||
Action.cpp
|
||||
Compilation.cpp
|
||||
DarwinSDKInfo.cpp
|
||||
Distro.cpp
|
||||
Driver.cpp
|
||||
DriverOptions.cpp
|
||||
|
||||
@@ -1786,7 +1786,7 @@ Optional<DarwinSDKInfo> parseSDKSettings(llvm::vfs::FileSystem &VFS,
|
||||
if (!A)
|
||||
return None;
|
||||
StringRef isysroot = A->getValue();
|
||||
auto SDKInfoOrErr = driver::parseDarwinSDKInfo(VFS, isysroot);
|
||||
auto SDKInfoOrErr = parseDarwinSDKInfo(VFS, isysroot);
|
||||
if (!SDKInfoOrErr) {
|
||||
llvm::consumeError(SDKInfoOrErr.takeError());
|
||||
TheDriver.Diag(diag::warn_drv_darwin_sdk_invalid_settings);
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "Cuda.h"
|
||||
#include "ROCm.h"
|
||||
#include "clang/Basic/DarwinSDKInfo.h"
|
||||
#include "clang/Basic/LangOptions.h"
|
||||
#include "clang/Driver/DarwinSDKInfo.h"
|
||||
#include "clang/Driver/Tool.h"
|
||||
#include "clang/Driver/ToolChain.h"
|
||||
#include "clang/Driver/XRayArgs.h"
|
||||
|
||||
Reference in New Issue
Block a user