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

[M68k][NFC] Rename M68kOperand::Kind to KindTy #112

Merged

Conversation

ricky26
Copy link

@ricky26 ricky26 commented Aug 25, 2021

Rename the M68kOperand::Type enumeration to KindTy to avoid ambiguity
with the Kind field when referencing enumeration values e.g.
Kind::Value.

This works around a compilation error under GCC 5, where GCC won't
lookup enum class values if you have a similarly named field
(see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60994).

The error in question is:
M68kAsmParser.cpp:857:8: error: 'Kind' is not a class, namespace, or enumeration

Differential Revision: https://reviews.llvm.org/D108723


This is needed for the M68k backend to compile with the Ubuntu LTS builder (see rust-lang/rust#88321).

CC @glaubitz, @jrtc27, not sure who I need to include on this for review.

Rename the M68kOperand::Type enumeration to KindTy to avoid ambiguity
with the Kind field when referencing enumeration values e.g.
`Kind::Value`.

This works around a compilation error under GCC 5, where GCC won't
lookup enum class values if you have a similarly named field
(see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60994).

The error in question is:
`M68kAsmParser.cpp:857:8: error: 'Kind' is not a class, namespace, or enumeration`

Differential Revision: https://reviews.llvm.org/D108723
Copy link
Member

@cuviper cuviper left a comment

Choose a reason for hiding this comment

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

LGTM!

@cuviper cuviper merged commit a93e47b into rust-lang:rustc/13.0-2021-08-08 Aug 25, 2021
@nikic
Copy link

nikic commented Aug 26, 2021

Could you please also file a bug blocking https://bugs.llvm.org/show_bug.cgi?id=release-13.0.0 to backport this to the upstream release branch?

@ricky26
Copy link
Author

ricky26 commented Aug 26, 2021

@nikic, okay, I've filed https://bugs.llvm.org/show_bug.cgi?id=51630.

vext01 pushed a commit to vext01/llvm-project that referenced this pull request Feb 7, 2024
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.

3 participants