[llvm-commits] [llvm] r93454 - in /llvm/trunk: include/llvm/MC/MCParsedAsmOperand.h lib/Target/X86/AsmParser/X86AsmParser.cpp
Chris Lattner
sabre at nondot.org
Thu Jan 14 13:20:55 PST 2010
Author: lattner
Date: Thu Jan 14 15:20:55 2010
New Revision: 93454
URL: http://llvm.org/viewvc/llvm-project?rev=93454&view=rev
Log:
introduce the MCParsedAsmOperand class.
Added:
llvm/trunk/include/llvm/MC/MCParsedAsmOperand.h
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Added: llvm/trunk/include/llvm/MC/MCParsedAsmOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParsedAsmOperand.h?rev=93454&view=auto
==============================================================================
--- llvm/trunk/include/llvm/MC/MCParsedAsmOperand.h (added)
+++ llvm/trunk/include/llvm/MC/MCParsedAsmOperand.h Thu Jan 14 15:20:55 2010
@@ -0,0 +1,28 @@
+//===-- llvm/MC/MCParsedAsmOperand.h - Asm Parser Operand -------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_MC_MCASMOPERAND_H
+#define LLVM_MC_MCASMOPERAND_H
+
+namespace llvm {
+
+/// MCParsedAsmOperand - This abstract class represents a source-level assembly
+/// instruction operand. It should be subclassed by target-specific code. This
+/// base class is used by target-independent clients and is the interface
+/// between parsing an asm instruction and recognizing it.
+class MCParsedAsmOperand {
+public:
+ MCParsedAsmOperand();
+ virtual ~MCParsedAsmOperand() = 0;
+ // TODO: Out of line vfun.
+};
+
+} // end namespace llvm.
+
+#endif
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=93454&r1=93453&r2=93454&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu Jan 14 15:20:55 2010
@@ -15,6 +15,7 @@
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCParsedAsmOperand.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Target/TargetAsmParser.h"
@@ -71,7 +72,7 @@
/// X86Operand - Instances of this class represent a parsed X86 machine
/// instruction.
-struct X86Operand {
+struct X86Operand : public MCParsedAsmOperand {
enum {
Token,
Register,
More information about the llvm-commits
mailing list