summaryrefslogtreecommitdiff
path: root/source/slang/slang-mangle.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-03-18 15:16:15 -0700
committerGitHub <noreply@github.com>2024-03-18 15:16:15 -0700
commit7f6e95917bb1929115b4cffa2ed9035aa8710ee4 (patch)
tree8a84264fe3d7e0c103c5a69446d3b3059f1d52da /source/slang/slang-mangle.cpp
parent2d41012ed2649093a58433eae60419d24073da90 (diff)
Fix name mangling and source file finding logic for precompiled module validation. (#3784)
* Fix name mangling. * Fix source validation. * Caching and search path fixes.
Diffstat (limited to 'source/slang/slang-mangle.cpp')
-rw-r--r--source/slang/slang-mangle.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/slang/slang-mangle.cpp b/source/slang/slang-mangle.cpp
index 9431533ac..d72644c9f 100644
--- a/source/slang/slang-mangle.cpp
+++ b/source/slang/slang-mangle.cpp
@@ -260,6 +260,12 @@ namespace Slang
for (Index i = 0; i < n; ++i)
emitVal(context, modifiedType->getModifier(i));
}
+ else if (auto andType = as<AndType>(type))
+ {
+ emitRaw(context, "Ta");
+ emitType(context, andType->getLeft());
+ emitType(context, andType->getRight());
+ }
else
{
SLANG_UNEXPECTED("unimplemented case in type mangling");
@@ -601,10 +607,18 @@ namespace Slang
emitQualifiedName(context, makeDeclRef(innerDecl), true);
return;
}
- else if (as<ForwardDerivativeRequirementDecl>(decl))
+ else if (auto fwdReq = as<ForwardDerivativeRequirementDecl>(decl))
+ {
emitRaw(context, "FwdReq_");
- else if (as<BackwardDerivativeRequirementDecl>(decl))
+ emitQualifiedName(context, fwdReq->originalRequirementDecl, true);
+ return;
+ }
+ else if (auto bwdReq = as<BackwardDerivativeRequirementDecl>(decl))
+ {
emitRaw(context, "BwdReq_");
+ emitQualifiedName(context, bwdReq->originalRequirementDecl, true);
+ return;
+ }
else
{
// TODO: handle other cases