From 20ea33f3321738e7c1b4cad7bdcaedcdb54dd0f0 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 11 Apr 2023 10:18:18 -0400 Subject: Artifact simplification (#2781) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP simplifying artifact interface. * Use ContainedKind. * Remove LazyCastableList. Use ContainedKind for find. * Remove ICastableList. * Remove need for ICastableList. * Remove IArtifactContainer. * Small fixes. * Small improvements around Artifact. * Make explicit find is for *representations* that can cast. Fix bug in handling casting in lookup. * Made associated items artifacts too. * Small fixes. * Small improvements around writing a container. --- tools/slang-test/slang-test-main.cpp | 5 +++-- tools/slang-unit-test/unit-test-file-system.cpp | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 51c618187..e7d2db94d 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -6,6 +6,7 @@ #include "../../source/core/slang-hex-dump-util.h" #include "../../source/core/slang-type-text-util.h" #include "../../source/core/slang-memory-arena.h" +#include "../../source/core/slang-castable.h" #include "../../source/compiler-core/slang-artifact-desc-util.h" #include "../../source/compiler-core/slang-artifact-helper.h" @@ -2286,7 +2287,7 @@ static TestResult runCPPCompilerSharedLibrary(TestContext* context, TestInput& i return TestResult::Fail; } - auto diagnostics = findAssociated(artifact); + auto diagnostics = findAssociatedRepresentation(artifact); if (diagnostics && SLANG_FAILED(diagnostics->getResult())) { @@ -2412,7 +2413,7 @@ static TestResult runCPPCompilerExecute(TestContext* context, TestInput& input) String actualOutput; - auto diagnostics = findAssociated(artifact); + auto diagnostics = findAssociatedRepresentation(artifact); // If the actual compilation failed, then the output will be the summary if (diagnostics && SLANG_FAILED(diagnostics->getResult())) diff --git a/tools/slang-unit-test/unit-test-file-system.cpp b/tools/slang-unit-test/unit-test-file-system.cpp index d7f613f65..05892b10b 100644 --- a/tools/slang-unit-test/unit-test-file-system.cpp +++ b/tools/slang-unit-test/unit-test-file-system.cpp @@ -9,8 +9,7 @@ #include "../../source/core/slang-deflate-compression-system.h" #include "../../source/core/slang-lz4-compression-system.h" - -#include "../../source/core/slang-destroyable.h" +#include "../../source/core/slang-castable.h" #include "../../source/core/slang-io.h" -- cgit v1.2.3