From 004f6e30b5df3a3df2c26fe5c4a5e78c49f71166 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 9 Nov 2022 19:19:17 -0800 Subject: Add `[ForwardDerivativeOf]` attribute. (#2501) * Add [ForwardDerivativeOf] attribute. * Fix handling around phi nodes. * Fixes. * Remove IR opcode for ForwardDerivativeOfDecoration. Co-authored-by: Yong He --- source/slang/slang-check-expr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-check-expr.cpp') diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 09dd9eea1..30db9ecfa 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -393,6 +393,15 @@ namespace Slang return derefExpr; } + InvokeExpr* SemanticsVisitor::constructUncheckedInvokeExpr(Expr* callee, const List& arguments) + { + auto result = m_astBuilder->create(); + result->loc = callee->loc; + result->functionExpr = callee; + result->arguments.addRange(arguments); + return result; + } + Expr* SemanticsVisitor::maybeUseSynthesizedDeclForLookupResult(LookupResultItem const& item, Expr* originalExpr) { // If the only result from lookup is an entry in an interface decl, it could be that -- cgit v1.2.3