|
@@ -301,6 +301,11 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
|
|
|
// HLSL Change: changed calling convention to __cdecl
|
|
|
int __cdecl main(int argc, char **argv) {
|
|
|
// HLSL Change Starts
|
|
|
+ if (llvm::sys::fs::SetupPerThreadFileSystem())
|
|
|
+ return 1;
|
|
|
+ llvm::sys::fs::AutoCleanupPerThreadFileSystem auto_cleanup_fs;
|
|
|
+ if (FAILED(DxcInitThreadMalloc())) return 1;
|
|
|
+ DxcSetThreadMallocOrDefault(nullptr);
|
|
|
llvm::sys::fs::MSFileSystem* msfPtr;
|
|
|
if (FAILED(CreateMSFileSystemForDisk(&msfPtr))) return 1;
|
|
|
std::unique_ptr<llvm::sys::fs::MSFileSystem> msf(msfPtr);
|