|
62 | 62 | #include "llvm/Support/MemoryBuffer.h" |
63 | 63 | #include "llvm/Support/Path.h" |
64 | 64 | #include "llvm/Support/raw_ostream.h" |
65 | | -#ifdef _WIN32 |
| 65 | +#ifdef _MSC_VER |
66 | 66 | #include <comdef.h> |
67 | 67 | #include <dia2.h> |
68 | 68 | #endif |
69 | 69 | #include <algorithm> |
70 | 70 | #include <unordered_map> |
71 | 71 |
|
72 | | -#ifdef _WIN32 |
| 72 | +#ifdef _MSC_VER |
73 | 73 | #pragma comment(lib, "version.lib") |
74 | 74 | #endif |
75 | 75 |
|
@@ -138,12 +138,12 @@ class DxcContext { |
138 | 138 | IDxcBlob **ppResult); |
139 | 139 |
|
140 | 140 | // Dia is only supported on Windows. |
141 | | -#ifdef _WIN32 |
| 141 | +#ifdef _MSC_VER |
142 | 142 | // TODO : Refactor two functions below. There are duplicate functions in |
143 | 143 | // DxcContext in dxa.cpp |
144 | 144 | HRESULT GetDxcDiaTable(IDxcLibrary *pLibrary, IDxcBlob *pTargetBlob, |
145 | 145 | IDiaTable **ppTable, LPCWSTR tableName); |
146 | | -#endif // _WIN32 |
| 146 | +#endif // _MSC_VER |
147 | 147 |
|
148 | 148 | HRESULT FindModuleBlob(hlsl::DxilFourCC fourCC, IDxcBlob *pSource, |
149 | 149 | IDxcLibrary *pLibrary, IDxcBlob **ppTargetBlob); |
@@ -1149,7 +1149,7 @@ HRESULT DxcContext::FindModuleBlob(hlsl::DxilFourCC fourCC, IDxcBlob *pSource, |
1149 | 1149 |
|
1150 | 1150 | // This function is currently only supported on Windows due to usage of |
1151 | 1151 | // IDiaTable. |
1152 | | -#ifdef _WIN32 |
| 1152 | +#ifdef _MSC_VER |
1153 | 1153 | // TODO : There is an identical code in DxaContext in Dxa.cpp. Refactor this |
1154 | 1154 | // function. |
1155 | 1155 | HRESULT DxcContext::GetDxcDiaTable(IDxcLibrary *pLibrary, IDxcBlob *pTargetBlob, |
@@ -1183,7 +1183,7 @@ HRESULT DxcContext::GetDxcDiaTable(IDxcLibrary *pLibrary, IDxcBlob *pTargetBlob, |
1183 | 1183 | *ppTable = pTable.Detach(); |
1184 | 1184 | return S_OK; |
1185 | 1185 | } |
1186 | | -#endif // _WIN32 |
| 1186 | +#endif // _MSC_VER |
1187 | 1187 |
|
1188 | 1188 | bool GetDLLFileVersionInfo(const char *dllPath, unsigned int *version) { |
1189 | 1189 | // This function is used to get version information from the DLL file. |
|
0 commit comments