sem: Add new TypeConstructor and TypeCast CallTargets

Nothing yet creates or uses these.

Also add Constant to sem::Call.
These will be needed for TypeConstructors / TypeCasts.

Bug: tint:888
Change-Id: I5b8c64062f3262bdffd210bb012db980c5610b26
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69107
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton
2021-11-12 13:53:49 +00:00
parent 2194a842ba
commit 5a40c6564c
12 changed files with 163 additions and 10 deletions

View File

@@ -2500,7 +2500,7 @@ sem::Call* Resolver::IntrinsicCall(const ast::CallExpression* expr,
}
auto* call = builder_->create<sem::Call>(expr, intrinsic, std::move(args),
current_statement_);
current_statement_, sem::Constant{});
current_function_->AddDirectlyCalledIntrinsic(intrinsic);
@@ -2544,7 +2544,7 @@ sem::Call* Resolver::FunctionCall(const ast::CallExpression* expr) {
}
auto* call = builder_->create<sem::Call>(expr, target, std::move(args),
current_statement_);
current_statement_, sem::Constant{});
if (current_function_) {
target->AddCallSite(call);