llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
388 stars 99 forks source link

[CIR][CIRGen][Builtin] Support __builtin_launder except in the case of -fstrict-vtable-pointers #1138

Closed ghehg closed 3 days ago

ghehg commented 1 week ago

Without using flag -fstrict-vtable-pointers, __builtin_launder is a noop. This PR implements that, and leave implementation for the case of -fstrict-vtable-pointers to future where there is a need.

This PR also adapted most of test cases from OG test case. I didn't use test cases in the namespace pessimizing_cases, as they have no difference even when -fstrict-vtable-pointers is on.

bcardosolopes commented 3 days ago

needs fixing conflict