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

[AccelTable][nfc] Add helper function to cast AccelTableData #77100

Merged
merged 1 commit into from Jan 8, 2024

Conversation

felipepiovezan
Copy link
Contributor

Specializations of AccelTableBase are always interested in accessing the derived versions of their data classes (e.g. DWARF5AccelTableData). They do so by sprinkling static_casts all over the code.

This commit adds a helper function to simplify this process, reducinng the number of casts that have to be made in the middle of code, making it easier to read.

Specializations of AccelTableBase are always interested in accessing the
derived versions of their data classes (e.g. DWARF5AccelTableData). They do so
by sprinkling `static_casts` all over the code.

This commit adds a helper function to simplify this process, reducinng the
number of casts that have to be made in the middle of code, making it easier to
read.
@felipepiovezan
Copy link
Contributor Author

I have some upcoming patches would benefit a lot from this type of utility

@felipepiovezan felipepiovezan merged commit e72c716 into llvm:main Jan 8, 2024
4 checks passed
@felipepiovezan felipepiovezan deleted the felipe/helper_cast_data branch January 8, 2024 20:04
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
)

Specializations of AccelTableBase are always interested in accessing the
derived versions of their data classes (e.g. DWARF5AccelTableData). They
do so by sprinkling `static_casts` all over the code.

This commit adds a helper function to simplify this process, reducinng
the number of casts that have to be made in the middle of code, making
it easier to read.
felipepiovezan added a commit to felipepiovezan/llvm-project that referenced this pull request Feb 2, 2024
)

Specializations of AccelTableBase are always interested in accessing the
derived versions of their data classes (e.g. DWARF5AccelTableData). They
do so by sprinkling `static_casts` all over the code.

This commit adds a helper function to simplify this process, reducinng
the number of casts that have to be made in the middle of code, making
it easier to read.

(cherry picked from commit e72c716)
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.

None yet

3 participants