File tree Expand file tree Collapse file tree
tools/clang/tools/dxcompiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717#include " dxc/Support/FileIOHelper.h"
1818#include " dxc/DXIL/DxilModule.h"
1919#include " dxc/Support/dxcapi.impl.h"
20+ #include " dxc/Support/dxcfilesystem.h"
2021#include " dxillib.h"
2122#include " dxcutil.h"
2223
24+ #include " llvm/Support/FileSystem.h"
2325#include " llvm/Support/MemoryBuffer.h"
2426#include " llvm/IRReader/IRReader.h"
2527#include " llvm/Bitcode/ReaderWriter.h"
@@ -73,6 +75,11 @@ HRESULT STDMETHODCALLTYPE DxcAssembler::AssembleToContainer(
7375 HRESULT hr = S_OK;
7476 DxcThreadMalloc TM (m_pMalloc);
7577 try {
78+ ::llvm::sys::fs::MSFileSystem *msfPtr;
79+ IFT (CreateMSFileSystemForDisk (&msfPtr));
80+ std::unique_ptr<::llvm::sys::fs::MSFileSystem> msf (msfPtr);
81+ ::llvm::sys::fs::AutoPerThreadSystem pts (msf.get ());
82+
7683 // Setup input buffer.
7784 // The ir parsing requires the buffer to be null terminated. We deal with
7885 // both source and bitcode input, so the input buffer may not be null terminated.
You can’t perform that action at this time.
0 commit comments