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

enhancement needed #84

Open
hanfeng0114 opened this issue Sep 6, 2023 · 0 comments
Open

enhancement needed #84

hanfeng0114 opened this issue Sep 6, 2023 · 0 comments

Comments

@hanfeng0114
Copy link
Contributor

The following code can't compile well on latest clang:

Enums.cc:
const string EOperandType_to_string(EOperandType in_enum)
{
switch (in_enum) {
case EOperandType::Constant: return "Constant";
case EOperandType::Immediate: return "Immediate";
case EOperandType::Choices: return "Choices";
case EOperandType::Register: return "Register";
case EOperandType::GPR: return "GPR";
case EOperandType::GPRSP: return "GPRSP";
case EOperandType::FPR: return "FPR";
case EOperandType::SIMDSR: return "SIMDSR";
case EOperandType::SIMDVR: return "SIMDVR";
case EOperandType::SysReg: return "SysReg";
case EOperandType::Branch: return "Branch";
case EOperandType::LoadStore: return "LoadStore";
case EOperandType::AuthBranch: return "AuthBranch";
case EOperandType::AuthLoadStore: return "AuthLoadStore";
case EOperandType::SystemOp: return "SystemOp";
case EOperandType::VECREG: return "VECREG";
case EOperandType::PREDREG: return "PREDREG";
case EOperandType::ALU: return "ALU";
case EOperandType::DataProcessing: return "DataProcessing";
default:
unknown_enum_value("EOperandType", (unsigned char)(in_enum));
}
return "";
}

The reason: https://stackoverflow.com/questions/8357240/how-to-automatically-convert-strongly-typed-enum-into-int

We need to enhance the code related.

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

No branches or pull requests

1 participant