summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-mc/AsmParser.cpp8
-rw-r--r--llvm/tools/llvm-mc/AsmParser.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp
index 5d73a9fa540..78cab38b4ff 100644
--- a/llvm/tools/llvm-mc/AsmParser.cpp
+++ b/llvm/tools/llvm-mc/AsmParser.cpp
@@ -21,6 +21,7 @@
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
+#include "llvm/MC/MCValue.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetAsmParser.h"
@@ -258,6 +259,13 @@ bool AsmParser::ParseExpression(const MCExpr *&Res) {
ParseBinOpRHS(1, Res);
}
+bool AsmParser::ParseParenExpression(const MCExpr *&Res) {
+ if (ParseParenExpr(Res))
+ return true;
+
+ return false;
+}
+
bool AsmParser::ParseAbsoluteExpression(int64_t &Res) {
const MCExpr *Expr;
diff --git a/llvm/tools/llvm-mc/AsmParser.h b/llvm/tools/llvm-mc/AsmParser.h
index b7082b688d4..2e328d9f6fd 100644
--- a/llvm/tools/llvm-mc/AsmParser.h
+++ b/llvm/tools/llvm-mc/AsmParser.h
@@ -70,6 +70,8 @@ public:
virtual bool ParseExpression(const MCExpr *&Res);
+ virtual bool ParseParenExpression(const MCExpr *&Res);
+
virtual bool ParseAbsoluteExpression(int64_t &Res);
virtual bool ParseRelocatableExpression(MCValue &Res);
OpenPOWER on IntegriCloud