Merge pull request #5067 from pow2clk/cp-release-1.7.2212
Move WinAdapter into interface directory (#5066)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f6e06d..4a9a60c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -608,7 +608,6 @@
include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})
-include_directories( ${LLVM_MAIN_INCLUDE_DIR}/dxc/Support) # HLSL Change
include_directories( ${LLVM_INCLUDE_DIR}/dxc/Tracing) # HLSL Change
# when crosscompiling import the executable targets from a file
diff --git a/include/dxc/DxilContainer/DxilContainer.h b/include/dxc/DxilContainer/DxilContainer.h
index 5dca11c..6f24c16 100644
--- a/include/dxc/DxilContainer/DxilContainer.h
+++ b/include/dxc/DxilContainer/DxilContainer.h
@@ -17,7 +17,7 @@
#include <stdint.h>
#include <iterator>
#include "dxc/DXIL/DxilConstants.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
struct IDxcContainerReflection;
diff --git a/include/dxc/DxilContainer/DxilPipelineStateValidation.h b/include/dxc/DxilContainer/DxilPipelineStateValidation.h
index febf49b..2cf401c 100644
--- a/include/dxc/DxilContainer/DxilPipelineStateValidation.h
+++ b/include/dxc/DxilContainer/DxilPipelineStateValidation.h
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <cstring>
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
// Don't include assert.h here.
// Since this header is included from multiple environments,
diff --git a/include/dxc/DxilContainer/DxilRuntimeReflection.h b/include/dxc/DxilContainer/DxilRuntimeReflection.h
index 80d93d5..3ed49d4 100644
--- a/include/dxc/DxilContainer/DxilRuntimeReflection.h
+++ b/include/dxc/DxilContainer/DxilRuntimeReflection.h
@@ -12,7 +12,7 @@
#pragma once
#include "dxc/DXIL/DxilConstants.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#define RDAT_NULL_REF ((uint32_t)0xFFFFFFFF)
diff --git a/include/dxc/DxilRootSignature/DxilRootSignature.h b/include/dxc/DxilRootSignature/DxilRootSignature.h
index 87d0bf9..d3104f3 100644
--- a/include/dxc/DxilRootSignature/DxilRootSignature.h
+++ b/include/dxc/DxilRootSignature/DxilRootSignature.h
@@ -16,7 +16,7 @@
#include <stdint.h>
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/DXIL/DxilConstants.h"
struct IDxcBlob;
diff --git a/include/dxc/HLSL/DxilValidation.h b/include/dxc/HLSL/DxilValidation.h
index e57cfff..6a9cdd1 100644
--- a/include/dxc/HLSL/DxilValidation.h
+++ b/include/dxc/HLSL/DxilValidation.h
@@ -13,7 +13,7 @@
#include "dxc/Support/Global.h"
#include "dxc/DXIL/DxilConstants.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include <memory>
namespace llvm {
diff --git a/include/dxc/Support/Global.h b/include/dxc/Support/Global.h
index 317f38c..3b88ed6 100644
--- a/include/dxc/Support/Global.h
+++ b/include/dxc/Support/Global.h
@@ -27,7 +27,7 @@
#include <stdarg.h>
#include <system_error>
#include "dxc/Support/exception.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
///////////////////////////////////////////////////////////////////////////////
// Memory allocation support.
diff --git a/include/dxc/Support/WinFunctions.h b/include/dxc/Support/WinFunctions.h
index 0f1efe3..28c826f 100644
--- a/include/dxc/Support/WinFunctions.h
+++ b/include/dxc/Support/WinFunctions.h
@@ -17,7 +17,7 @@
#ifndef _WIN32
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
HRESULT StringCchCopyEx(LPSTR pszDest, size_t cchDest, LPCSTR pszSrc,
LPSTR *ppszDestEnd, size_t *pcchRemaining, DWORD dwFlags);
diff --git a/include/dxc/Support/WinIncludes.h b/include/dxc/Support/WinIncludes.h
index 80178d5..a0c611c 100644
--- a/include/dxc/Support/WinIncludes.h
+++ b/include/dxc/Support/WinIncludes.h
@@ -59,7 +59,7 @@
#else // _MSC_VER
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#ifdef __cplusplus
// Define operator overloads to enable bit operations on enum values that are
diff --git a/include/dxc/Support/exception.h b/include/dxc/Support/exception.h
index ff3f321..bff4e73 100644
--- a/include/dxc/Support/exception.h
+++ b/include/dxc/Support/exception.h
@@ -11,7 +11,7 @@
#pragma once
#include "dxc/Support/ErrorCodes.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include <exception>
#include <string>
diff --git a/include/dxc/Test/WEXAdapter.h b/include/dxc/Test/WEXAdapter.h
index 8389ca5..c9eba87 100644
--- a/include/dxc/Test/WEXAdapter.h
+++ b/include/dxc/Test/WEXAdapter.h
@@ -6,7 +6,7 @@
#include <unistd.h>
#include <wchar.h>
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/Support/WinFunctions.h"
#include "gtest/gtest.h"
diff --git a/include/dxc/Support/WinAdapter.h b/include/dxc/WinAdapter.h
similarity index 100%
rename from include/dxc/Support/WinAdapter.h
rename to include/dxc/WinAdapter.h
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index ec6be5d..b0c49df 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -15,7 +15,7 @@
#ifndef LLVM_C_CORE_H
#define LLVM_C_CORE_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm-c/Support.h"
#ifdef __cplusplus
diff --git a/include/llvm-c/Disassembler.h b/include/llvm-c/Disassembler.h
index 7c12236..7cc8f88 100644
--- a/include/llvm-c/Disassembler.h
+++ b/include/llvm-c/Disassembler.h
@@ -15,7 +15,7 @@
#ifndef LLVM_C_DISASSEMBLER_H
#define LLVM_C_DISASSEMBLER_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/Support/DataTypes.h"
#include <stddef.h>
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index aa88db0..5144c59 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -17,7 +17,7 @@
#ifndef LLVM_ADT_STLEXTRAS_H
#define LLVM_ADT_STLEXTRAS_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/Support/Compiler.h"
#include <algorithm> // for std::all_of
#include <cassert>
diff --git a/include/llvm/Analysis/ConstantFolding.h b/include/llvm/Analysis/ConstantFolding.h
index cc457e7..292d0a0 100644
--- a/include/llvm/Analysis/ConstantFolding.h
+++ b/include/llvm/Analysis/ConstantFolding.h
@@ -20,7 +20,7 @@
#ifndef LLVM_ANALYSIS_CONSTANTFOLDING_H
#define LLVM_ANALYSIS_CONSTANTFOLDING_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
namespace llvm {
class Constant;
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index 507328e..f7b2c82 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -14,7 +14,7 @@
#ifndef LLVM_MC_MCSTREAMER_H
#define LLVM_MC_MCSTREAMER_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCDirectives.h"
diff --git a/include/llvm/Support/ConvertUTF.h b/include/llvm/Support/ConvertUTF.h
index 3ad4275..0513a72 100644
--- a/include/llvm/Support/ConvertUTF.h
+++ b/include/llvm/Support/ConvertUTF.h
@@ -180,7 +180,7 @@
/*************************************************************************/
/* Below are LLVM-specific wrappers of the functions above. */
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index 208336f..4ccd295 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -27,7 +27,7 @@
#ifndef LLVM_SUPPORT_FILESYSTEM_H
#define LLVM_SUPPORT_FILESYSTEM_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
diff --git a/include/llvm/Support/Format.h b/include/llvm/Support/Format.h
index 94190ec..67ee193 100644
--- a/include/llvm/Support/Format.h
+++ b/include/llvm/Support/Format.h
@@ -23,7 +23,7 @@
#ifndef LLVM_SUPPORT_FORMAT_H
#define LLVM_SUPPORT_FORMAT_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index a97139f..8aed823 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -14,7 +14,7 @@
#ifndef LLVM_SUPPORT_MATHEXTRAS_H
#define LLVM_SUPPORT_MATHEXTRAS_H
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/Support/Compiler.h"
#include "llvm/Support/SwapByteOrder.h"
#include <cassert>
diff --git a/include/llvm/TableGen/Main.h b/include/llvm/TableGen/Main.h
index 4fff09c..664bb6b 100644
--- a/include/llvm/TableGen/Main.h
+++ b/include/llvm/TableGen/Main.h
@@ -18,7 +18,7 @@
#ifdef _WIN32
#include <sal.h>
#else
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#endif
// HLSL Change Ends
diff --git a/lib/DXIL/DxilModule.cpp b/lib/DXIL/DxilModule.cpp
index 2166cc7..e390800 100644
--- a/lib/DXIL/DxilModule.cpp
+++ b/lib/DXIL/DxilModule.cpp
@@ -14,7 +14,7 @@
#include "dxc/DXIL/DxilShaderModel.h"
#include "dxc/DXIL/DxilSignatureElement.h"
#include "dxc/DXIL/DxilFunctionProps.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/DXIL/DxilEntryProps.h"
#include "dxc/DXIL/DxilSubobject.h"
#include "dxc/DXIL/DxilInstructions.h"
diff --git a/lib/DXIL/DxilModuleHelper.cpp b/lib/DXIL/DxilModuleHelper.cpp
index 3bdf872..898faee 100644
--- a/lib/DXIL/DxilModuleHelper.cpp
+++ b/lib/DXIL/DxilModuleHelper.cpp
@@ -14,7 +14,7 @@
#include "dxc/DXIL/DxilShaderModel.h"
#include "dxc/DXIL/DxilSignatureElement.h"
#include "dxc/DXIL/DxilFunctionProps.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/DXIL/DxilEntryProps.h"
#include "dxc/DXIL/DxilSubobject.h"
#include "dxc/DXIL/DxilInstructions.h"
diff --git a/lib/DxcSupport/WinAdapter.cpp b/lib/DxcSupport/WinAdapter.cpp
index 81a27b5..8ed47bf 100644
--- a/lib/DxcSupport/WinAdapter.cpp
+++ b/lib/DxcSupport/WinAdapter.cpp
@@ -9,7 +9,7 @@
#ifndef _WIN32
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/Support/WinFunctions.h"
//===--------------------------- CAllocator -------------------------------===//
diff --git a/lib/DxilContainer/DxilContainerReader.cpp b/lib/DxilContainer/DxilContainerReader.cpp
index 6db6533..bf00847 100644
--- a/lib/DxilContainer/DxilContainerReader.cpp
+++ b/lib/DxilContainer/DxilContainerReader.cpp
@@ -10,7 +10,7 @@
///////////////////////////////////////////////////////////////////////////////
#include "dxc/Support/Global.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/DxilContainer/DxilContainer.h"
#include "dxc/DxilContainer/DxilContainerReader.h"
diff --git a/lib/HLSL/DxilContainerReflection.cpp b/lib/HLSL/DxilContainerReflection.cpp
index 5f7ae48..4df43c7 100644
--- a/lib/HLSL/DxilContainerReflection.cpp
+++ b/lib/HLSL/DxilContainerReflection.cpp
@@ -42,7 +42,7 @@
#else
// Dummy D3D11 struct to allow nix-dead code to compile
struct D3D11_SHADER_INPUT_BIND_DESC {int dummy;};
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#endif
#include "dxc/DxilContainer/DxilRuntimeReflection.h"
diff --git a/lib/HLSL/HLModule.cpp b/lib/HLSL/HLModule.cpp
index 117c25f..ac6a2d2 100644
--- a/lib/HLSL/HLModule.cpp
+++ b/lib/HLSL/HLModule.cpp
@@ -15,7 +15,7 @@
#include "dxc/HLSL/HLModule.h"
#include "dxc/DXIL/DxilTypeSystem.h"
#include "dxc/DXIL/DxilUtil.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/Constants.h"
diff --git a/lib/MSSupport/MSFileSystemImpl.cpp b/lib/MSSupport/MSFileSystemImpl.cpp
index f37c6af..b7a77ad 100644
--- a/lib/MSSupport/MSFileSystemImpl.cpp
+++ b/lib/MSSupport/MSFileSystemImpl.cpp
@@ -26,7 +26,7 @@
#include <new>
#include "dxc/Support/WinIncludes.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "llvm/Support/MSFileSystem.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/lib/Support/ConvertUTFWrapper.cpp b/lib/Support/ConvertUTFWrapper.cpp
index 20477bd..aab7d2c 100644
--- a/lib/Support/ConvertUTFWrapper.cpp
+++ b/lib/Support/ConvertUTFWrapper.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/SwapByteOrder.h"
#include <string>
diff --git a/lib/Support/regerror.c b/lib/Support/regerror.c
index 95b3ae8..782b75d 100644
--- a/lib/Support/regerror.c
+++ b/lib/Support/regerror.c
@@ -45,7 +45,7 @@
#include "regutils.h"
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#ifdef _MSC_VER
#define snprintf _snprintf
diff --git a/lib/Support/regex_impl.h b/lib/Support/regex_impl.h
index bbf64cf..1b05eaa 100644
--- a/lib/Support/regex_impl.h
+++ b/lib/Support/regex_impl.h
@@ -38,7 +38,7 @@
#ifndef _REGEX_IMPL_H_ // HLSL Change
#define _REGEX_IMPL_H_ // HLSL Change
-#include "dxc/Support/WinAdapter.h" // HLSL Change
+#include "dxc/WinAdapter.h" // HLSL Change
#include <sys/types.h>
typedef off_t llvm_regoff_t;
diff --git a/tools/clang/include/clang/AST/HlslTypes.h b/tools/clang/include/clang/AST/HlslTypes.h
index 90766c9..3b19bde 100644
--- a/tools/clang/include/clang/AST/HlslTypes.h
+++ b/tools/clang/include/clang/AST/HlslTypes.h
@@ -20,7 +20,7 @@
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
#include "dxc/DXIL/DxilConstants.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "llvm/Support/Casting.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
diff --git a/tools/clang/lib/Sema/SemaHLSL.cpp b/tools/clang/lib/Sema/SemaHLSL.cpp
index eff1b59..627c08f 100644
--- a/tools/clang/lib/Sema/SemaHLSL.cpp
+++ b/tools/clang/lib/Sema/SemaHLSL.cpp
@@ -36,7 +36,7 @@
#include "llvm/Support/raw_ostream.h"
#include "dxc/Support/Global.h"
#include "dxc/Support/WinIncludes.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/dxcapi.internal.h"
#include "dxc/HlslIntrinsicOp.h"
#include "gen_intrin_main_tables_15.h"
diff --git a/tools/clang/tools/dxcompiler/dxillib.h b/tools/clang/tools/dxcompiler/dxillib.h
index 5d4caea..39e0bbe 100644
--- a/tools/clang/tools/dxcompiler/dxillib.h
+++ b/tools/clang/tools/dxcompiler/dxillib.h
@@ -13,7 +13,7 @@
#ifndef __DXC_DXILLIB__
#define __DXC_DXILLIB__
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
#include "dxc/Support/WinIncludes.h"
// Initialize Dxil library.
diff --git a/tools/clang/unittests/HLSL/HLSLTestOptions.cpp b/tools/clang/unittests/HLSL/HLSLTestOptions.cpp
index a56dc16..15963ec 100644
--- a/tools/clang/unittests/HLSL/HLSLTestOptions.cpp
+++ b/tools/clang/unittests/HLSL/HLSLTestOptions.cpp
@@ -14,7 +14,7 @@
#include "HLSLTestOptions.h"
#include "dxc/Test/WEXAdapter.h"
-#include "dxc/Support/WinAdapter.h"
+#include "dxc/WinAdapter.h"
namespace clang {
namespace hlsl {