summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-31 15:33:07 -0700
committeryum <yum.food.vr@gmail.com>2025-10-31 15:33:07 -0700
commitd680309ff1440333f2ab1537c63cb46f02e0b8a0 (patch)
treebc98d11ab359267644ff194b83c46431f9ba7421 /source/slang/slang-lower-to-ir.cpp
parent0a2506e2fce7d754489066c51f51574bdd428bc0 (diff)
meow
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp38
1 files changed, 1 insertions, 37 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index d52b9bd04..1b08a0dff 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -2698,42 +2698,6 @@ static bool shouldApplyNonPublicSuffix(Decl* target)
return false;
}
-static bool hasExplicitExportedLinkage(IRInst* inst)
-{
- if (!inst)
- return false;
-
- return inst->findDecoration<IRPublicDecoration>() ||
- inst->findDecoration<IRExportDecoration>() ||
- inst->findDecoration<IRHLSLExportDecoration>() ||
- inst->findDecoration<IRExternCppDecoration>() ||
- inst->findDecoration<IRDllImportDecoration>() ||
- inst->findDecoration<IRDllExportDecoration>() ||
- inst->findDecoration<IRCudaDeviceExportDecoration>() ||
- inst->findDecoration<IRCudaHostDecoration>() ||
- inst->findDecoration<IRCudaKernelDecoration>() ||
- inst->findDecoration<IRTorchEntryPointDecoration>() ||
- inst->findDecoration<IRAutoPyBindCudaDecoration>() ||
- inst->findDecoration<IRPyExportDecoration>();
-}
-
-static bool shouldApplyNonPublicSuffix(IRInst* inst)
-{
- if (!inst)
- return false;
-
- if (hasExplicitExportedLinkage(inst))
- return false;
-
- if (as<IRGlobalValueWithCode>(inst) || as<IRStructType>(inst) || as<IRClassType>(inst) ||
- as<IRInterfaceType>(inst))
- {
- return true;
- }
-
- return false;
-}
-
static void appendSuffixIfNeeded(IRGenContext* context, IRInst* inst, Decl* decl, String& name)
{
bool needsSuffix = false;
@@ -2743,7 +2707,7 @@ static void appendSuffixIfNeeded(IRGenContext* context, IRInst* inst, Decl* decl
}
else
{
- needsSuffix = shouldApplyNonPublicSuffix(inst);
+ needsSuffix = shouldApplyModuleNonPublicSuffix(inst);
}
if (!needsSuffix)