You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
The text was updated successfully, but these errors were encountered: