summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-03 18:02:31 -0700
committerGitHub <noreply@github.com>2024-05-03 18:02:31 -0700
commit59903ef7e4ddd8885f71567bf0fc85527a88fffc (patch)
tree700a177860d24610780390b35277aa8ff5c47947 /source/slang/slang-emit-cpp.cpp
parent54153a3681c7c6ef86c6f7a864719d32a1934240 (diff)
Add host shared library target. (#4098)
* Add host shared library target. * Attempt fix. * Fix warnings. * try fix. * Fix test. * Fix.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
-rw-r--r--source/slang/slang-emit-cpp.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index 2b1f6ad81..7e327cab4 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -329,6 +329,7 @@ SlangResult CPPSourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, S
out << ">";
return SLANG_OK;
}
+ return SLANG_FAIL;
}
case kIROp_IntLit:
{
@@ -1728,6 +1729,10 @@ void CPPSourceEmitter::emitPreModuleImpl()
m_writer->emit("using namespace SLANG_PRELUDE_NAMESPACE;\n");
m_writer->emit("#endif\n\n");
}
+ else if (m_target == CodeGenTarget::HostCPPSource)
+ {
+ m_writer->emit("namespace Slang{ inline void handleSignal(SignalType, char const*) {} }\n");
+ }
Super::emitPreModuleImpl();
}