diff options
Diffstat (limited to 'source/compiler-core/slang-llvm-compiler.cpp')
| -rw-r--r-- | source/compiler-core/slang-llvm-compiler.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/compiler-core/slang-llvm-compiler.cpp b/source/compiler-core/slang-llvm-compiler.cpp index 9b301ffab..e143500c0 100644 --- a/source/compiler-core/slang-llvm-compiler.cpp +++ b/source/compiler-core/slang-llvm-compiler.cpp @@ -1,6 +1,8 @@ // slang-llvm-compiler.cpp #include "slang-llvm-compiler.h" +#include "slang-downstream-dep1.h" + #include "../core/slang-common.h" #include "../../slang-com-helper.h" @@ -34,17 +36,19 @@ namespace Slang return SLANG_FAIL; } - typedef SlangResult(*CreateDownstreamCompilerFunc)(RefPtr<DownstreamCompiler>& out); + typedef SlangResult(*CreateDownstreamCompilerFunc_Dep1)(RefPtr<DownstreamCompiler_Dep1>& out); - auto fn = (CreateDownstreamCompilerFunc)library->findFuncByName("createLLVMDownstreamCompiler"); + auto fn = (CreateDownstreamCompilerFunc_Dep1)library->findFuncByName("createLLVMDownstreamCompiler"); if (!fn) { return SLANG_FAIL; } - RefPtr<DownstreamCompiler> downstreamCompiler; + RefPtr<DownstreamCompiler_Dep1> downstreamCompilerDep1; + + SLANG_RETURN_ON_FAIL(fn(downstreamCompilerDep1)); - SLANG_RETURN_ON_FAIL(fn(downstreamCompiler)); + ComPtr<IDownstreamCompiler> downstreamCompiler(new DownstreamCompilerAdapter_Dep1(downstreamCompilerDep1)); set->addSharedLibrary(library); set->addCompiler(downstreamCompiler); |
