mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
Convert TableGen assert to error
This gives a nice message about the location of errors in a large tablegen file, which is much more useful for users Differential Revision: https://reviews.llvm.org/D102740
This commit is contained in:
parent
c5cd1cf901
commit
b0a805b25d
@ -2853,7 +2853,8 @@ TreePatternNodePtr TreePattern::ParseTreePattern(Init *TheInit,
|
||||
ParseTreePattern(Dag->getArg(0), Dag->getArgNameStr(0));
|
||||
|
||||
// Apply the type cast.
|
||||
assert(New->getNumTypes() == 1 && "FIXME: Unhandled");
|
||||
if (New->getNumTypes() != 1)
|
||||
error("Type cast can only have one type!");
|
||||
const CodeGenHwModes &CGH = getDAGPatterns().getTargetInfo().getHwModes();
|
||||
New->UpdateNodeType(0, getValueTypeByHwMode(Operator, CGH), *this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user