Skip to content

Commit

Permalink
Merge pull request #22 from Rot127/prevent-enum-conv
Browse files Browse the repository at this point in the history
Specify the uninion member for each enum value.
  • Loading branch information
kabeor authored Jul 22, 2023
2 parents f705553 + 0d2cd69 commit 6c58194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/PrinterCapstone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3655,7 +3655,7 @@ void PrinterCapstone::searchableTablesEmitMapIII(const GenericTable &Table,
OpName = Regex("\"").sub("", OpName);
EnumName = TargetName + "_" + StringRef(Table.CppTypeName).upper() + "_" +
StringRef(OpName).upper();
Repr = "\"" + OpName + "\", { " + EnumName + " }";
Repr = "\"" + OpName + "\", { ." + StringRef(Table.CppTypeName).lower() + " = " + EnumName + " }";
OutS << Repr;

// Emit enum name
Expand Down

0 comments on commit 6c58194

Please sign in to comment.