summaryrefslogtreecommitdiff
path: root/include/llvm/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-31 08:08:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-31 08:08:17 +0000
commitc18274ba9cabd5699452870daae3c2d9accecc37 (patch)
tree4c5bc2cb44b8b47a52ab6541d155b68a272d0f5c /include/llvm/MC
parentcb579b3338fe8d9e4424b138f597a4696cb89de3 (diff)
downloadllvm-c18274ba9cabd5699452870daae3c2d9accecc37.tar.gz
llvm-c18274ba9cabd5699452870daae3c2d9accecc37.tar.bz2
llvm-c18274ba9cabd5699452870daae3c2d9accecc37.tar.xz
llvm-mc: Add MCAsmParser::Parse[Paren]Expression forms which return an MCExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80574 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCAsmParser.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmParser.h b/include/llvm/MC/MCAsmParser.h
index e0a48f1e9c..23c97f58af 100644
--- a/include/llvm/MC/MCAsmParser.h
+++ b/include/llvm/MC/MCAsmParser.h
@@ -15,6 +15,7 @@
namespace llvm {
class MCAsmLexer;
class MCContext;
+class MCExpr;
class MCValue;
class SMLoc;
class Twine;
@@ -45,6 +46,21 @@ public:
/// clients.
virtual bool Error(SMLoc L, const Twine &Msg) = 0;
+ /// ParseExpression - Parse an arbitrary expression.
+ ///
+ /// @param Res - The value of the expression. The result is undefined
+ /// on error.
+ /// @result - False on success.
+ virtual bool ParseExpression(const MCExpr *&Res) = 0;
+
+ /// ParseParenExpression - Parse an arbitrary expression, assuming that an
+ /// initial '(' has already been consumed.
+ ///
+ /// @param Res - The value of the expression. The result is undefined
+ /// on error.
+ /// @result - False on success.
+ virtual bool ParseParenExpression(const MCExpr *&Res) = 0;
+
/// ParseAbsoluteExpression - Parse an expression which must evaluate to an
/// absolute value.
///