reduce indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-06-24 07:16:25 +00:00
parent f8cbde46fb
commit 02758a44e4

View File

@ -80,30 +80,25 @@ AsmToken X86AsmLexer::LexTokenATT() {
case AsmToken::Error:
SetError(Lexer->getErrLoc(), Lexer->getErr());
return AsmToken(lexedToken);
case AsmToken::Percent:
{
case AsmToken::Percent: {
const AsmToken &nextToken = lexTentative();
if (nextToken.getKind() == AsmToken::Identifier) {
unsigned regID = MatchRegisterName(nextToken.getString());
if (regID) {
lexDefinite();
StringRef regStr(lexedToken.getString().data(),
lexedToken.getString().size() +
nextToken.getString().size());
return AsmToken(AsmToken::Register,
regStr,
static_cast<int64_t>(regID));
}
else {
return AsmToken(lexedToken);
}
}
else {
if (nextToken.getKind() != AsmToken::Identifier)
return AsmToken(lexedToken);
if (unsigned regID = MatchRegisterName(nextToken.getString())) {
lexDefinite();
StringRef regStr(lexedToken.getString().data(),
lexedToken.getString().size() +
nextToken.getString().size());
return AsmToken(AsmToken::Register,
regStr,
static_cast<int64_t>(regID));
}
return AsmToken(lexedToken);
}
}
}