Compile DxilLibraryReflection.inl on Linux and macOS

This commit is contained in:
Lei Zhang 2018-10-24 09:09:56 -04:00
Родитель 56ceb7faef
Коммит b107c06d97
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -9,8 +9,8 @@
// //
///////////////////////////////////////////////////////////////////////////////
#include "dxc/hlsl/DxilRuntimeReflection.h"
#include <windows.h>
#include "dxc/HLSL/DxilRuntimeReflection.h"
#include "llvm/ADT/STLExtras.h"
#include <unordered_map>
#include <vector>
#include <memory>
@ -312,7 +312,7 @@ void DxilRuntimeReflection_impl::AddString(const char *ptr) {
int size = ::MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, ptr, -1,
nullptr, 0);
if (size != 0) {
auto pNew = std::make_unique<wchar_t[]>(size);
auto pNew = llvm::make_unique<wchar_t[]>(size);
::MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, ptr, -1,
pNew.get(), size);
m_StringMap[ptr] = std::move(pNew);

Просмотреть файл

@ -2341,13 +2341,15 @@ ID3D12FunctionReflection *DxilLibraryReflection::GetFunctionByIndex(INT Function
return m_FunctionVector[FunctionIndex];
}
// DxilRuntimeReflection implementation
#include "dxc/HLSL/DxilRuntimeReflection.inl"
#else // LLVM_ON_WIN32
#else
void hlsl::CreateDxcContainerReflection(IDxcContainerReflection **ppResult) {
*ppResult = nullptr;
}
DEFINE_CROSS_PLATFORM_UUIDOF(IDxcContainerReflection)
#endif // LLVM_ON_WIN32
// DxilRuntimeReflection implementation
#include "dxc/HLSL/DxilRuntimeReflection.inl"