From 1d4b5b6fd2433a10cc7ab87626cb560f54b0acbb Mon Sep 17 00:00:00 2001 From: Yong He Date: Sun, 3 Sep 2023 12:56:31 -0700 Subject: Proper lowering of functiosn that returns NonCopyable values. (#3179) * Proper lowering of functiosn that returns NonCopyable values. * Fix tests. * Fix clang errors. * Fix. * Fix clang error. --------- Co-authored-by: Yong He --- source/slang/slang-emit-hlsl.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'source/slang/slang-emit-hlsl.cpp') diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 30de45773..66902a624 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -1136,31 +1136,6 @@ void HLSLSourceEmitter::_emitPrefixTypeAttr(IRAttr* attr) } } -void HLSLSourceEmitter::_emitInstAsVarInitializerImpl(IRInst* inst) -{ - // Some opcodes can be folded into a variable initialization - // by allowing the variable to be "default-constructed." - // - switch (inst->getOp()) - { - case kIROp_AllocateOpaqueHandle: - if (shouldFoldInstIntoUseSites(inst)) - { - return; - } - break; - - default: - break; - } - - // We fall back to the default behavior for all targets, - // which is to emit `inst` as an initial-value expression - // after an `=`. - // - Super::_emitInstAsVarInitializerImpl(inst); -} - void HLSLSourceEmitter::emitSimpleFuncParamImpl(IRParam* param) { emitRateQualifiers(param); -- cgit v1.2.3