diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-09-01 17:41:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-01 17:41:26 -0400 |
| commit | 2a869c105dcc23ede8f5e6e16b08261f45aa5aad (patch) | |
| tree | 3c6d70683856608da8bc5774983786460b4f4e2d /source/compiler-core/slang-llvm-compiler.cpp | |
| parent | cc0b81350f6b681c794b4ac7c0f3b5fe73cb19eb (diff) | |
Upgrade slang-llvm (#2390)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Use IDownstreamCompiler inteface directly with updated slang-llvm.
* Small tidy around includes in slang-llvm-compiler.cpp
Diffstat (limited to 'source/compiler-core/slang-llvm-compiler.cpp')
| -rw-r--r-- | source/compiler-core/slang-llvm-compiler.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/source/compiler-core/slang-llvm-compiler.cpp b/source/compiler-core/slang-llvm-compiler.cpp index 4cb3b7260..382dd0842 100644 --- a/source/compiler-core/slang-llvm-compiler.cpp +++ b/source/compiler-core/slang-llvm-compiler.cpp @@ -1,25 +1,7 @@ // slang-llvm-compiler.cpp #include "slang-llvm-compiler.h" -#include "slang-downstream-dep1.h" - #include "../core/slang-common.h" -#include "../../slang-com-helper.h" - -#include "../core/slang-blob.h" - -#include "../core/slang-string-util.h" -#include "../core/slang-string-slice-pool.h" - -#include "../core/slang-io.h" -#include "../core/slang-shared-library.h" -#include "../core/slang-semantic-version.h" -#include "../core/slang-char-util.h" - -#include "slang-include-system.h" -#include "slang-source-loc.h" - -#include "../core/slang-shared-library.h" namespace Slang { @@ -36,19 +18,17 @@ namespace Slang return SLANG_FAIL; } - typedef SlangResult(*CreateDownstreamCompilerFunc_Dep1)(RefPtr<DownstreamCompiler_Dep1>& out); + typedef SlangResult(*CreateDownstreamCompilerFunc)(const Guid& intf, IDownstreamCompiler** outCompiler); - auto fn = (CreateDownstreamCompilerFunc_Dep1)library->findFuncByName("createLLVMDownstreamCompiler"); + auto fn = (CreateDownstreamCompilerFunc)library->findFuncByName("createLLVMDownstreamCompiler_V2"); if (!fn) { return SLANG_FAIL; } - RefPtr<DownstreamCompiler_Dep1> downstreamCompilerDep1; - - SLANG_RETURN_ON_FAIL(fn(downstreamCompilerDep1)); + ComPtr<IDownstreamCompiler> downstreamCompiler; - ComPtr<IDownstreamCompiler> downstreamCompiler(new DownstreamCompilerAdapter_Dep1(downstreamCompilerDep1, ArtifactPayload::None)); + SLANG_RETURN_ON_FAIL(fn(IDownstreamCompiler::getTypeGuid(), downstreamCompiler.writeRef())); set->addSharedLibrary(library); set->addCompiler(downstreamCompiler); |
