#ifndef LLVM_WINDOWSDRIVER_MSVCPATHS_H
#define LLVM_WINDOWSDRIVER_MSVCPATHS_H
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/TargetParser/Triple.h"
#include <optional>
#include <string>
namespace llvm {
namespace vfs {
class FileSystem;
}
enum class SubDirectoryType { … };
enum class ToolsetLayout { … };
const char *archToWindowsSDKArch(llvm::Triple::ArchType Arch);
const char *archToLegacyVCArch(llvm::Triple::ArchType Arch);
const char *archToDevDivInternalArch(llvm::Triple::ArchType Arch);
bool appendArchToWindowsSDKLibPath(int SDKMajor, llvm::SmallString<128> LibPath,
llvm::Triple::ArchType Arch,
std::string &path);
std::string getSubDirectoryPath(SubDirectoryType Type, ToolsetLayout VSLayout,
const std::string &VCToolChainPath,
llvm::Triple::ArchType TargetArch,
llvm::StringRef SubdirParent = "");
bool useUniversalCRT(ToolsetLayout VSLayout, const std::string &VCToolChainPath,
llvm::Triple::ArchType TargetArch,
llvm::vfs::FileSystem &VFS);
bool getWindowsSDKDir(vfs::FileSystem &VFS,
std::optional<llvm::StringRef> WinSdkDir,
std::optional<llvm::StringRef> WinSdkVersion,
std::optional<llvm::StringRef> WinSysRoot,
std::string &Path, int &Major,
std::string &WindowsSDKIncludeVersion,
std::string &WindowsSDKLibVersion);
bool getUniversalCRTSdkDir(vfs::FileSystem &VFS,
std::optional<llvm::StringRef> WinSdkDir,
std::optional<llvm::StringRef> WinSdkVersion,
std::optional<llvm::StringRef> WinSysRoot,
std::string &Path, std::string &UCRTVersion);
bool findVCToolChainViaCommandLine(
vfs::FileSystem &VFS, std::optional<llvm::StringRef> VCToolsDir,
std::optional<llvm::StringRef> VCToolsVersion,
std::optional<llvm::StringRef> WinSysRoot, std::string &Path,
ToolsetLayout &VSLayout);
bool findVCToolChainViaEnvironment(vfs::FileSystem &VFS, std::string &Path,
ToolsetLayout &VSLayout);
bool
findVCToolChainViaSetupConfig(vfs::FileSystem &VFS,
std::optional<llvm::StringRef> VCToolsVersion,
std::string &Path, ToolsetLayout &VSLayout);
bool findVCToolChainViaRegistry(std::string &Path, ToolsetLayout &VSLayout);
}
#endif