From 2a869c105dcc23ede8f5e6e16b08261f45aa5aad Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 1 Sep 2022 17:41:26 -0400 Subject: 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 --- source/compiler-core/slang-llvm-compiler.cpp | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'source/compiler-core/slang-llvm-compiler.cpp') 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& 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 downstreamCompilerDep1; - - SLANG_RETURN_ON_FAIL(fn(downstreamCompilerDep1)); + ComPtr downstreamCompiler; - ComPtr downstreamCompiler(new DownstreamCompilerAdapter_Dep1(downstreamCompilerDep1, ArtifactPayload::None)); + SLANG_RETURN_ON_FAIL(fn(IDownstreamCompiler::getTypeGuid(), downstreamCompiler.writeRef())); set->addSharedLibrary(library); set->addCompiler(downstreamCompiler); -- cgit v1.2.3