Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out the common import pattern in import_ref.cpp. #4557

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

zygoloid
Copy link
Contributor

This is primarily an exploration of how we could simplify the import_ref logic. This is not ready to land; in particular we may want a different mechanism for customization here rather than a bunch of overloads.

Comment on lines 1677 to 1678
CARBON_CHECK(import_ir_.types().GetInstId(inst.type_id) ==
SemIR::InstId::BuiltinWitnessType);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME: We're assuming this type ID is the same in both IRs here

context_.GetBuiltinType(SemIR::BuiltinInstKind::WitnessType),
.elements_id = elements_id});
CARBON_CHECK(import_ir_.types().GetInstId(inst.type_id) ==
SemIR::InstId::BuiltinWitnessType);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME: We're assuming this type ID is the same in both IRs here

avoid `std::forward`, manually expand the packs, inline the lambda.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant