mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:31:03 +01:00
When a function call appears in a generic, and calls another generic that has a concrete type in its call-site signature, that concrete type will be completed only in the file that contains the call. The generic containing the call won't require completeness to be checked again when forming a specific call, because the type was concrete. This means that when lowering the call instruction, there is no single file that is guaranteed to contain complete types for all of the callee's parameters -- the file containing the specific callee won't necessarily have completed the concrete parts of the signature, and the files containing the definition and call won't necessarily have completed the symbolic parts of the signature. To handle this, look at both versions of the function when building its lowered signature -- the version that we saw when forming the `call` instruction and the version corresponding to the concrete, specific callee, and combine information from both to form the LLVM function type. --------- Co-authored-by: Geoff Romer <gromer@google.com>