Fixed llvm-mc in edis mode to use the result of

operand.evaluate as an error code, not as the
contents of the operand.

llvm-svn: 126181
This commit is contained in:
Sean Callanan 2011-02-22 02:09:15 +00:00
parent 7d2f87b9a8
commit 5b23294799
1 changed files with 4 additions and 1 deletions

View File

@ -328,7 +328,10 @@ int Disassembler::disassembleEnhanced(const std::string &TS,
uint64_t evaluatedResult; uint64_t evaluatedResult;
void *Arg[] = { disassembler, &Out }; void *Arg[] = { disassembler, &Out };
evaluatedResult = operand->evaluate(evaluatedResult, verboseEvaluator, Arg); if (operand->evaluate(evaluatedResult, verboseEvaluator, Arg)) {
errs() << "error: Couldn't evaluate an operand\n";
return -1;
}
Out << "=" << evaluatedResult << " "; Out << "=" << evaluatedResult << " ";
} }