diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-02-26 16:10:08 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-26 16:10:08 -0800 |
| commit | 1d8e93cd434f0c7acbb6db747b32c3a3720c5c2e (patch) | |
| tree | 3c0ed78e8b1b6ec5f5972dc7e5442f2762a915dd /source/slang | |
| parent | 3286076f3a0ff0eb72cf66caeadcde50a9540105 (diff) | |
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 <yonghe@outlook.com>
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
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<ConstructorDecl>() ) - { - if(!ctorDeclRef.getDecl()->body && isFromStdLib(ctorDeclRef.getDecl()) && !as<InterfaceDecl>(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); |
