summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index c8cda0dca..bedfb1161 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -15,8 +15,6 @@
#include "../compiler-core/slang-artifact-associated-impl.h"
#include "../compiler-core/slang-artifact-container-util.h"
-#include "../compiler-core/slang-json-source-map-util.h"
-
#include "../core/slang-memory-file-system.h"
#include "slang-module-library.h"
@@ -4884,12 +4882,11 @@ SlangResult _addLibraryReference(EndToEndCompileRequest* req, IArtifact* artifac
isDerivedFrom(assocDesc.payload, ArtifactPayload::SourceMap) &&
isDerivedFrom(assocDesc.style, ArtifactStyle::Obfuscated))
{
- ComPtr<ISlangBlob> sourceMapBlob;
- SLANG_RETURN_ON_FAIL(associated->loadBlob(ArtifactKeep::No, sourceMapBlob.writeRef()));
+ ComPtr<ICastable> castable;
+ SLANG_RETURN_ON_FAIL(associated->getOrCreateRepresentation(SourceMap::getTypeGuid(), ArtifactKeep::Yes, castable.writeRef()));
+
+ auto sourceMap = as<SourceMap>(castable);
- RefPtr<SourceMap> sourceMap;
- SLANG_RETURN_ON_FAIL(JSONSourceMapUtil::read(sourceMapBlob, nullptr, sourceMap));
-
// I guess we add to all ir modules?
for (auto irModule : library->m_modules)