Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Preprocessor trick to convert enum to string
- const char *LookupInstructionText(Insn i)
- {
- const char *result = "???";
- switch (i)
- {
- #define SINKCOMPILER_IR_DEFINITION(name) case name: result = #name; break;
- #define SINKCOMPILER_IR_EQUIVALENCE(name, is) /* empty */
- #include "sinkcompiler_IR_insn.h"
- #undef SINKCOMPILER_IR_EQIVALENCE
- #undef SINKCOMPILER_IR_DEFINITION
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment