diff options
| author | Yong He <yonghe@outlook.com> | 2022-06-21 09:25:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 09:25:51 -0700 |
| commit | 92dfec2320421113498ae7b5b72e78bd8b5b09a8 (patch) | |
| tree | 94abc8d02468c50112841a86ee2843024d22d51b /source/slang/slang-emit-cpp.cpp | |
| parent | d2a467c7a941c4453b3d825c9d5bb4d72230c8ba (diff) | |
Add CPU executable compile test (#2278)
* Add cpu executable compile test
* Fix.
* Fix permission on linux
* retrigger build
Co-authored-by: Yong He <yhe@nvidia.com>
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; |
