summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-29 06:33:53 +0000
committerChris Lattner <sabre@nondot.org>2009-07-29 06:33:53 +0000
commit37dfdecafdaabc87d3a9dcfc8c33a2308af2763c (patch)
treeabe7560051d8dfd0f2dc99b22b05df21a2fdea30
parentc3c35b17218248f9b4786a6125bf9719e536eeb2 (diff)
downloadllvm-37dfdecafdaabc87d3a9dcfc8c33a2308af2763c.tar.gz
llvm-37dfdecafdaabc87d3a9dcfc8c33a2308af2763c.tar.bz2
llvm-37dfdecafdaabc87d3a9dcfc8c33a2308af2763c.tar.xz
more syntactic cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77442 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index c70d24db78..08db8a1f1c 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -56,6 +56,11 @@ public:
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 @@ struct X86Operand {
}
};
-}
+} // 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 @@ bool X86ATTAsmParser::ParseOperand(X86Operand &Op) {
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 @@ bool X86ATTAsmParser::ParseOperand(X86Operand &Op) {
// FIXME: Note the '*' in the operand for use by the matcher.
return false;
}
- }
}
/// ParseMemOperand: segment: disp(basereg, indexreg, scale)