From 1d8e93cd434f0c7acbb6db747b32c3a3720c5c2e Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:10:08 -0800 Subject: WAR for ForceInline not working issue in stdlib (#3630) * WAR for ForceInline not working issue in stdlib Work-around for an issue #3628 This commit allows __init() functions in stdlib to be decleared without "[__unsafeForceInlineEarly]" or "[ForceInline]". We need to find a proper solution for the issue later. * Remove unnecessary checking of the missing body This fixes an issue #3628 This commmit removes an unnecessary checking of the missing body of the constructors in stdlib. This change was suggested by Yong. --------- Co-authored-by: Yong He --- source/slang/slang-lower-to-ir.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source') diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 1359e1242..9d010ec1c 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -901,14 +901,6 @@ LoweredValInfo emitCallToDeclRef( args)); } - if( auto ctorDeclRef = funcDeclRef.as() ) - { - if(!ctorDeclRef.getDecl()->body && isFromStdLib(ctorDeclRef.getDecl()) && !as(ctorDeclRef.getParent().getDecl())) - { - SLANG_UNREACHABLE("stdlib error: __init() has no definition."); - } - } - // Fallback case is to emit an actual call. // LoweredValInfo funcVal = emitDeclRef(context, funcDeclRef, funcType); -- cgit v1.2.3