aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCAsmParser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-15 19:28:38 +0000
committerChris Lattner <sabre@nondot.org>2010-01-15 19:28:38 +0000
commitb4307b33705ef9e660db640b2f70d6246aa51165 (patch)
tree9e5e2dfb75bf69750dcd137e935b3b90fab31b0b /lib/MC/MCAsmParser.cpp
parent1f19f0f31dace5d145fecbe1f0f3fea4fb9ae813 (diff)
downloadexternal_llvm-b4307b33705ef9e660db640b2f70d6246aa51165.zip
external_llvm-b4307b33705ef9e660db640b2f70d6246aa51165.tar.gz
external_llvm-b4307b33705ef9e660db640b2f70d6246aa51165.tar.bz2
extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions. Use this to provide range info for several new X86Operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAsmParser.cpp')
-rw-r--r--lib/MC/MCAsmParser.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/MC/MCAsmParser.cpp b/lib/MC/MCAsmParser.cpp
index 2287e89..b58d6d4 100644
--- a/lib/MC/MCAsmParser.cpp
+++ b/lib/MC/MCAsmParser.cpp
@@ -8,7 +8,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCAsmParser.h"
-
+#include "llvm/MC/MCParsedAsmOperand.h"
+#include "llvm/Support/SourceMgr.h"
using namespace llvm;
MCAsmParser::MCAsmParser() {
@@ -16,3 +17,15 @@ MCAsmParser::MCAsmParser() {
MCAsmParser::~MCAsmParser() {
}
+
+bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
+ SMLoc L;
+ return ParseExpression(Res, L, L);
+}
+
+
+/// getStartLoc - Get the location of the first token of this operand.
+SMLoc MCParsedAsmOperand::getStartLoc() const { return SMLoc(); }
+SMLoc MCParsedAsmOperand::getEndLoc() const { return SMLoc(); }
+
+