From 15055d20c143cb398bd3e269541eebf24777390a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 22 Aug 2022 10:08:25 -0400 Subject: Replace DownstreamCompileResult with Artifact (#2369) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP replacing DownstreamCompileResult. * First attempt at replacing DownstreamCompileResult with IArtifact and associated types. * Small renaming around CharSlice. * ICastable -> ISlangCastable Added IClonable Fix issue with cloning in ArtifactDiagnostics. * Only add the blob if one is defined in DXC. * Guard adding blob representation. * Make cloneInterface available across code base. Set enums backing type for ArtifactDiagnostic. * Added ::create for ArtifactDiagnostics. --- .../compiler-core/slang-artifact-handler-impl.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'source/compiler-core/slang-artifact-handler-impl.cpp') diff --git a/source/compiler-core/slang-artifact-handler-impl.cpp b/source/compiler-core/slang-artifact-handler-impl.cpp index c342becec..028fa1bb9 100644 --- a/source/compiler-core/slang-artifact-handler-impl.cpp +++ b/source/compiler-core/slang-artifact-handler-impl.cpp @@ -14,9 +14,6 @@ #include "../core/slang-io.h" #include "../core/slang-shared-library.h" -// For workaround for DownstreamResult -#include "slang-downstream-dep1.h" - namespace Slang { /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!! DefaultArtifactHandler !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ @@ -129,24 +126,6 @@ SlangResult DefaultArtifactHandler::getOrCreateRepresentation(IArtifact* artifac } } - // TODO(JS): Temporary whilst DownstreamCompileResult is - // Special handling for DownstreamCompileResult - if (auto downstreamResult = findRepresentation(artifact)) - { - if (guid == ISlangBlob::getTypeGuid()) - { - ComPtr blob; - SLANG_RETURN_ON_FAIL(downstreamResult->getBinary(blob)); - return _addRepresentation(artifact, keep, blob, outCastable); - } - else if (guid == ISlangSharedLibrary::getTypeGuid()) - { - ComPtr lib; - SLANG_RETURN_ON_FAIL(DownstreamUtil_Dep1::getDownstreamSharedLibrary(downstreamResult, lib)); - return _addRepresentation(artifact, keep, lib, outCastable); - } - } - // We can ask each representation if they can do the conversion to the type, if they can we just use that for (ICastable* castable : reps) { -- cgit v1.2.3