Skip to content

Conversation

AdUhTkJm
Copy link
Contributor

Clang relies on llvm::Intrinsic::getOrInsertDeclaration to handle functions marked as ClangBuiltin in TableGen. That function receives a CodeGenModule* so CIR can't use that. We need to re-implement parts of it.

@AdUhTkJm AdUhTkJm force-pushed the builtin branch 2 times, most recently from cdd1075 to a9bc4c8 Compare March 17, 2025 21:47
Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

Overall looks good! This is a good candidate for tablegen usage

@AdUhTkJm AdUhTkJm force-pushed the builtin branch 2 times, most recently from 6fe06db to 45ea71f Compare March 19, 2025 14:57
@AdUhTkJm AdUhTkJm force-pushed the builtin branch 2 times, most recently from d21e1f8 to 88f1709 Compare March 22, 2025 14:32
Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM after adding comment

@bcardosolopes bcardosolopes merged commit d59e44b into llvm:main Mar 25, 2025
9 checks passed
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
Clang relies on `llvm::Intrinsic::getOrInsertDeclaration` to handle
functions marked as `ClangBuiltin` in TableGen. That function receives a
`CodeGenModule*` so CIR can't use that. We need to re-implement parts of
it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants