Skip to content

Commit 816268f

Browse files
committed
tools update
1 parent c3412b0 commit 816268f

File tree

9 files changed

+25
-18
lines changed

9 files changed

+25
-18
lines changed

tools/clang/include/clang/AST/Attr.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ class InheritableParamAttr : public InheritableAttr {
149149
}
150150
};
151151

152+
// MinGW defines interface as struct
153+
#ifdef interface
154+
#undef interface
155+
#endif
156+
152157
#include "clang/AST/Attrs.inc"
153158

154159
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,

tools/clang/tools/dxclib/dxc.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@
6262
#include "llvm/Support/MemoryBuffer.h"
6363
#include "llvm/Support/Path.h"
6464
#include "llvm/Support/raw_ostream.h"
65-
#ifdef _WIN32
65+
#ifdef _MSC_VER
6666
#include <comdef.h>
6767
#include <dia2.h>
6868
#endif
6969
#include <algorithm>
7070
#include <unordered_map>
7171

72-
#ifdef _WIN32
72+
#ifdef _MSC_VER
7373
#pragma comment(lib, "version.lib")
7474
#endif
7575

@@ -138,12 +138,12 @@ class DxcContext {
138138
IDxcBlob **ppResult);
139139

140140
// Dia is only supported on Windows.
141-
#ifdef _WIN32
141+
#ifdef _MSC_VER
142142
// TODO : Refactor two functions below. There are duplicate functions in
143143
// DxcContext in dxa.cpp
144144
HRESULT GetDxcDiaTable(IDxcLibrary *pLibrary, IDxcBlob *pTargetBlob,
145145
IDiaTable **ppTable, LPCWSTR tableName);
146-
#endif // _WIN32
146+
#endif // _MSC_VER
147147

148148
HRESULT FindModuleBlob(hlsl::DxilFourCC fourCC, IDxcBlob *pSource,
149149
IDxcLibrary *pLibrary, IDxcBlob **ppTargetBlob);
@@ -1149,7 +1149,7 @@ HRESULT DxcContext::FindModuleBlob(hlsl::DxilFourCC fourCC, IDxcBlob *pSource,
11491149

11501150
// This function is currently only supported on Windows due to usage of
11511151
// IDiaTable.
1152-
#ifdef _WIN32
1152+
#ifdef _MSC_VER
11531153
// TODO : There is an identical code in DxaContext in Dxa.cpp. Refactor this
11541154
// function.
11551155
HRESULT DxcContext::GetDxcDiaTable(IDxcLibrary *pLibrary, IDxcBlob *pTargetBlob,
@@ -1183,7 +1183,7 @@ HRESULT DxcContext::GetDxcDiaTable(IDxcLibrary *pLibrary, IDxcBlob *pTargetBlob,
11831183
*ppTable = pTable.Detach();
11841184
return S_OK;
11851185
}
1186-
#endif // _WIN32
1186+
#endif // _MSC_VER
11871187

11881188
bool GetDLLFileVersionInfo(const char *dllPath, unsigned int *version) {
11891189
// This function is used to get version information from the DLL file.

tools/clang/tools/dxcompiler/DXCompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "dxc/config.h"
1717
#include "llvm/Support/FileSystem.h"
1818
#include "llvm/Support/ManagedStatic.h"
19-
#ifdef LLVM_ON_WIN32
19+
#ifdef _MSC_VER
2020
#include "dxcetw.h"
2121
#endif
2222

tools/clang/tools/dxcompiler/DXCompiler.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
#define VER_ORIGINALFILENAME_STR "DXCompiler.dll"
1212

1313
// #include <common.ver>
14+
#ifdef _MSC_VER
1415
#include "dxcetw.rc"
16+
#endif

tools/clang/tools/dxcompiler/dxcapi.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "dxc/Support/WinIncludes.h"
1313

14-
#ifdef _WIN32
14+
#ifdef _MSC_VER
1515
#define DXC_API_IMPORT __declspec(dllexport)
1616
#else
1717
#define DXC_API_IMPORT __attribute__((visibility("default")))
@@ -21,7 +21,7 @@
2121
#include "dxc/config.h"
2222
#include "dxc/dxcisense.h"
2323
#include "dxc/dxctools.h"
24-
#ifdef _WIN32
24+
#ifdef _MSC_VER
2525
#include "dxcetw.h"
2626
#endif
2727
#include "dxc/DxilContainer/DxcContainerBuilder.h"
@@ -96,7 +96,7 @@ static HRESULT ThreadMallocDxcCreateInstance(REFCLSID rclsid, REFIID riid,
9696
hr = CreateDxcLinker(riid, ppv);
9797
}
9898
// Note: The following targets are not yet enabled for non-Windows platforms.
99-
#ifdef _WIN32
99+
#ifdef _MSC_VER
100100
else if (IsEqualCLSID(rclsid, CLSID_DxcDiaDataSource)) {
101101
hr = CreateDxcDiaDataSource(riid, ppv);
102102
}

tools/clang/tools/dxcompiler/dxcompilerobj.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#include "dxc/Support/dxcapi.use.h"
5151
#include "dxc/Support/microcom.h"
5252

53-
#ifdef _WIN32
53+
#ifdef _MSC_VER
5454
#include "dxcetw.h"
5555
#endif
5656
#include "dxcompileradapter.h"

tools/clang/tools/dxcompiler/dxcpdbutils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#include <string>
4848
#include <vector>
4949

50-
#ifdef _WIN32
50+
#ifdef _MSC_VER
5151
#include "dxc/dxcpix.h"
5252
#include <dia2.h>
5353
#endif
@@ -273,7 +273,7 @@ struct DxcPdbUtilsAdapter : public IDxcPdbUtils {
273273
};
274274

275275
struct DxcPdbUtils : public IDxcPdbUtils2
276-
#ifdef _WIN32
276+
#ifdef _MSC_VER
277277
// Skip Pix debug info on linux for dia dependence.
278278
,
279279
public IDxcPixDxilDebugInfoFactory
@@ -843,7 +843,7 @@ struct DxcPdbUtils : public IDxcPdbUtils2
843843

844844
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid,
845845
void **ppvObject) override {
846-
#ifdef _WIN32
846+
#ifdef _MSC_VER
847847
HRESULT hr =
848848
DoBasicQueryInterface<IDxcPdbUtils2, IDxcPixDxilDebugInfoFactory>(
849849
this, iid, ppvObject);
@@ -1071,7 +1071,7 @@ struct DxcPdbUtils : public IDxcPdbUtils2
10711071
return CopyBlobWide(m_Name, ppResult);
10721072
}
10731073

1074-
#ifdef _WIN32
1074+
#ifdef _MSC_VER
10751075
virtual STDMETHODIMP
10761076
NewDxcPixDxilDebugInfo(IDxcPixDxilDebugInfo **ppDxilDebugInfo) override {
10771077
if (!m_pDebugProgramBlob)

tools/clang/tools/dxcvalidator/dxcvalidator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "dxc/Support/Global.h"
2727
#include "dxc/Support/dxcapi.impl.h"
2828

29-
#ifdef _WIN32
29+
#ifdef _MSC_VER
3030
#include "dxcetw.h"
3131
#endif
3232

tools/clang/tools/dxildll/dxildll.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// //
1111
///////////////////////////////////////////////////////////////////////////////
1212

13-
#ifdef _WIN32
13+
#ifdef _MSC_VER
1414
#define DXC_API_IMPORT
1515
#else
1616
#define DXC_API_IMPORT __attribute__((visibility("default")))
@@ -22,7 +22,7 @@
2222
#include "llvm/Support/FileSystem.h"
2323
#include "llvm/Support/ManagedStatic.h"
2424
#include <algorithm>
25-
#ifdef _WIN32
25+
#ifdef _MSC_VER
2626
#include "Tracing/DxcRuntimeEtw.h"
2727
#include "dxc/Tracing/dxcetw.h"
2828
#endif

0 commit comments

Comments
 (0)