From bd4bf3d4f794561f5869f33f574b6ddc4fe336bf Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 30 Jun 2009 01:49:52 +0000 Subject: llvm-mc: Evaluation for relocatable expressions. llvm-svn: 74496 --- llvm/tools/llvm-mc/AsmExpr.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-mc/AsmExpr.h') diff --git a/llvm/tools/llvm-mc/AsmExpr.h b/llvm/tools/llvm-mc/AsmExpr.h index be26b46b4cd..e8650e468f2 100644 --- a/llvm/tools/llvm-mc/AsmExpr.h +++ b/llvm/tools/llvm-mc/AsmExpr.h @@ -16,6 +16,7 @@ namespace llvm { class MCContext; class MCSymbol; +class MCValue; class AsmExpr { public: @@ -39,10 +40,17 @@ public: /// 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; } }; -- cgit v1.2.3