diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 009ca17f9..d21e16186 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -894,6 +894,12 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst) case kIROp_Alloca: return false; + // Never fold these, because their result cannot be computed + // as a sub-expression (they must be emitted as a declaration + // or statement). + case kIROp_DefaultConstruct: + return false; + // Always fold these in, because they are trivial // case kIROp_IntLit: |
