Skip to content

Conversation

ghehg
Copy link
Contributor

@ghehg ghehg commented Nov 18, 2024

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.

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 with minor nit

@bcardosolopes
Copy link
Member

needs fixing conflict

@bcardosolopes bcardosolopes merged commit a18db3c into llvm:main Nov 26, 2024
6 checks passed
lanza pushed a commit that referenced this pull request Mar 18, 2025
…f -fstrict-vtable-pointers (#1138)

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](https://github.com/llvm/clangir/blob/3aed38cf52e72cb51a907fad9dd53802f6505b81/clang/test/CodeGenCXX/builtin-launder.cpp#L1).
I didn't use test cases in the namespace
[pessimizing_cases](https://github.com/llvm/clangir/blob/3aed38cf52e72cb51a907fad9dd53802f6505b81/clang/test/CodeGenCXX/builtin-launder.cpp#L269),
as they have no difference even when `-fstrict-vtable-pointers` is on.
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
…f -fstrict-vtable-pointers (llvm#1138)

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](https://github.com/llvm/clangir/blob/3aed38cf52e72cb51a907fad9dd53802f6505b81/clang/test/CodeGenCXX/builtin-launder.cpp#L1).
I didn't use test cases in the namespace
[pessimizing_cases](https://github.com/llvm/clangir/blob/3aed38cf52e72cb51a907fad9dd53802f6505b81/clang/test/CodeGenCXX/builtin-launder.cpp#L269),
as they have no difference even when `-fstrict-vtable-pointers` is on.
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