diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 06c5f005b..75cf421af 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -11384,6 +11384,12 @@ RefPtr<IRModule> generateIRForTranslationUnit( if (compileRequest->getLinkage()->m_optionSet.shouldRunNonEssentialValidation()) { + // We don't allow recursive types. + checkForRecursiveTypes(module, compileRequest->getSink()); + + if (compileRequest->getSink()->getErrorCount() != 0) + return module; + // Propagate `constexpr`-ness through the dataflow graph (and the // call graph) based on constraints imposed by different instructions. propagateConstExpr(module, compileRequest->getSink()); @@ -11395,10 +11401,6 @@ RefPtr<IRModule> generateIRForTranslationUnit( // instructions remain. checkForMissingReturns(module, compileRequest->getSink()); - - // We don't allow recursive types. - checkForRecursiveTypes(module, compileRequest->getSink()); - // Check for invalid differentiable function body. checkAutoDiffUsages(module, compileRequest->getSink()); |
