mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 11:40:27 +00:00
Continue: emit function definitions for specifics. (#5068)
Resolve instruction id depending on the context from which a function is called. Calling a function in a function context that does not have a definition emitted before reaching lowering will cause a crash. This needs a change in check/eval layer.
This commit is contained in:
1 parent
156ab889f8
commit
d3869a529b
8 files changed
+546
-68
No files matched your search
@@ -21,6 +21,8 @@ auto GetCalleeFunction(const File& sem_ir, InstId callee_id,
|
||||
if (specific_id.has_value()) {
|
||||
callee_id = sem_ir.constant_values().GetInstIdIfValid(
|
||||
GetConstantValueInSpecific(sem_ir, specific_id, callee_id));
|
||||
CARBON_CHECK(callee_id.has_value(),
|
||||
"Invalid callee id in a specific context");
|
||||
}
|
||||
|
||||
if (auto specific_function =
|
||||
|
||||
Reference in new issue
Block a user