[PATCH] MC: handle ParseDirective properly
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Thu Jan 9 13:21:35 PST 2014
LGTM with just two small comments. Maybe after this is in we should also update the generic parser interface to not depend on a boolean return for error/success.
================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:7927
@@ -7924,3 +7926,3 @@
if (getParser().parseExpression(Value))
- return true;
+ return false;
----------------
The auxiliary parseFoo functions can now return void, no?
================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2693
@@ -2695,3 +2692,3 @@
} else {
- return Error(L, "unexpected directive " + IDVal);
+ llvm_unreachable("unexpected directive " + IDVal);
}
----------------
This should probably be an Error + return false since it can be reached with a broken .s
http://llvm-reviews.chandlerc.com/D2410
More information about the llvm-commits
mailing list