[llvm-commits] [llvm] r77442 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Chris Lattner
sabre at nondot.org
Tue Jul 28 23:33:53 PDT 2009
Author: lattner
Date: Wed Jul 29 01:33:53 2009
New Revision: 77442
URL: http://llvm.org/viewvc/llvm-project?rev=77442&view=rev
Log:
more syntactic cleanups.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=77442&r1=77441&r2=77442&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Wed Jul 29 01:33:53 2009
@@ -56,6 +56,11 @@
virtual bool ParseInstruction(const StringRef &Name, MCInst &Inst);
};
+
+} // end anonymous namespace
+
+
+namespace {
/// X86Operand - Instances of this class represent a parsed X86 machine
/// instruction.
@@ -120,12 +125,11 @@
}
};
-}
+} // end anonymous namespace.
-//
bool X86ATTAsmParser::ParseRegister(X86Operand &Op) {
- AsmToken Tok = getLexer().getTok();
+ const AsmToken &Tok = getLexer().getTok();
assert(Tok.is(AsmToken::Register) && "Invalid token kind!");
// FIXME: Validate register for the current architecture; we have to do
@@ -158,7 +162,7 @@
Op = X86Operand::CreateImm(Val);
return false;
}
- case AsmToken::Star: {
+ case AsmToken::Star:
getLexer().Lex(); // Eat the star.
if (getLexer().is(AsmToken::Register)) {
@@ -170,7 +174,6 @@
// FIXME: Note the '*' in the operand for use by the matcher.
return false;
}
- }
}
/// ParseMemOperand: segment: disp(basereg, indexreg, scale)
More information about the llvm-commits
mailing list