[PATCH] Add assertion to detect invalid registers in the PowerPC MC instruction lowering
hfinkel at anl.gov
hfinkel at anl.gov
Tue Mar 17 11:05:13 PDT 2015
Thanks for looking into this. I'd prefer to use the enum fields directly, however, instead of calling getRegisterName. We should just be able to write this:
assert(MO.getReg() > PPC::NoRegister && MO.getReg() < PPC::NUM_TARGET_REGS &&
"Invalid register for this target!");
http://reviews.llvm.org/D8384
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list