Skip to content

Commit

Permalink
[CIR][CIRGen] Use Clang Codegen's skeleton in CIRGenFunction::buildBu…
Browse files Browse the repository at this point in the history
…iltinExpr (llvm#967)

This PR helps us to triage unimplemented builtins (that are target
independent).
There are unhandled builtins in CIR Codegen
`[CIRGenFunction::buildBuiltinExpr](https://github.com/llvm/clangir/blob/4c446b3287895879da598e23164d338d04bced3e/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp#L305)`.
And those builtins have implementation in
[OG](https://github.com/llvm/clangir/blob/4c446b3287895879da598e23164d338d04bced3e/clang/lib/CodeGen/CGBuiltin.cpp#L2573).
Currently, those builtins just are treated as LibraryCall or some other
ways which eventually get failure, and failure messages are confusing.
This PR address this problem by refactoring
`CIRGenFunction::buildBuiltinExpr` to keep the same skeleton as OG
counterpart `CodeGenFunction::EmitBuiltinExpr`, and add builtin name to
NYI message
  • Loading branch information
ghehg authored and lanza committed Oct 19, 2024
1 parent bb3b839 commit b24f6f6
Showing 1 changed file with 955 additions and 220 deletions.
Loading

0 comments on commit b24f6f6

Please sign in to comment.