diff options
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index c23135c70..31f09e400 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -2595,6 +2595,15 @@ void CPPSourceEmitter::_maybeEmitExportLike(IRInst* inst) // Specially handle export, as we don't want to emit it multiple times if (getTargetReq()->isWholeProgramRequest()) { + if (auto nameHint = inst->findDecoration<IRNameHintDecoration>()) + { + if (nameHint->getName() == "main") + { + // Don't output any decorations on main function. + return; + } + } + bool isExternC = false; bool isExported = false; |
