llvm-mc: Evaluation for relocatable expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74496 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-mc/AsmExpr.h b/tools/llvm-mc/AsmExpr.h
index be26b46..e8650e4 100644
--- a/tools/llvm-mc/AsmExpr.h
+++ b/tools/llvm-mc/AsmExpr.h
@@ -16,6 +16,7 @@
namespace llvm {
class MCContext;
class MCSymbol;
+class MCValue;
class AsmExpr {
public:
@@ -39,10 +40,17 @@
/// EvaluateAsAbsolute - Try to evaluate the expression to an absolute value.
///
- /// @param Res - The absolute value if evaluation succeeds.
+ /// @param Res - The absolute value, if evaluation succeeds.
/// @result - True on success.
bool EvaluateAsAbsolute(MCContext &Ctx, int64_t &Res) const;
+ /// EvaluateAsRelocatable - Try to evaluate the expression to a relocatable
+ /// value.
+ ///
+ /// @param Res - The relocatable value, if evaluation succeeds.
+ /// @result - True on success.
+ bool EvaluateAsRelocatable(MCContext &Ctx, MCValue &Res) const;
+
static bool classof(const AsmExpr *) { return true; }
};