add virtual methods to get the start/end of a MCParsedAsmOperand,
authorChris Lattner <sabre@nondot.org>
Thu, 14 Jan 2010 22:29:57 +0000 (22:29 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Jan 2010 22:29:57 +0000 (22:29 +0000)
the default implementation returns "unknown".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCParsedAsmOperand.h
tools/llvm-mc/AsmParser.cpp

index 847ab43f44d57b1079d3167962c12c6d81fdcba7..2bd6f00bd2bb545033377ab3e9ab0be398fd885d 100644 (file)
@@ -20,7 +20,11 @@ class MCParsedAsmOperand {
 public:  
   MCParsedAsmOperand() {}
   virtual ~MCParsedAsmOperand() {}
-  // TODO: Out of line vfun.
+  
+  /// getStartLoc - Get the location of the first token of this operand.
+  virtual SMLoc getStartLoc() const;
+  /// getEndLoc - Get the location of the last token of this operand.
+  virtual SMLoc getEndLoc() const;
 };
 
 } // end namespace llvm.
index bd0e0e259dcdfdfae2cdedd79e8549c4cccefe05..2eb75a76dd2150693e59c0d5590fafbb5af1f240 100644 (file)
 #include "llvm/Target/TargetAsmParser.h"
 using namespace llvm;
 
+/// getStartLoc - Get the location of the first token of this operand.
+SMLoc MCParsedAsmOperand::getStartLoc() const { return SMLoc(); }
+SMLoc MCParsedAsmOperand::getEndLoc() const { return SMLoc(); }
+
+
 // Mach-O section uniquing.
 //
 // FIXME: Figure out where this should live, it should be shared by