From: Chris Lattner Date: Thu, 14 Jan 2010 22:29:57 +0000 (+0000) Subject: add virtual methods to get the start/end of a MCParsedAsmOperand, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9d3c755fd6bf33335fad66dca9a629c630fc3bf2;p=oota-llvm.git add virtual methods to get the start/end of a MCParsedAsmOperand, the default implementation returns "unknown". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MC/MCParsedAsmOperand.h b/include/llvm/MC/MCParsedAsmOperand.h index 847ab43f44d..2bd6f00bd2b 100644 --- a/include/llvm/MC/MCParsedAsmOperand.h +++ b/include/llvm/MC/MCParsedAsmOperand.h @@ -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. diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index bd0e0e259dc..2eb75a76dd2 100644 --- a/tools/llvm-mc/AsmParser.cpp +++ b/tools/llvm-mc/AsmParser.cpp @@ -29,6 +29,11 @@ #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