diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 01:49:52 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 01:49:52 +0000 |
| commit | bd4bf3d4f794561f5869f33f574b6ddc4fe336bf (patch) | |
| tree | caaa9425ec4a186a0347b855f82d5855d4a9fe5c /llvm/tools/llvm-mc/AsmExpr.h | |
| parent | 7013ca5434416861eab0f04038087bbe2daa7f77 (diff) | |
| download | bcm5719-llvm-bd4bf3d4f794561f5869f33f574b6ddc4fe336bf.tar.gz bcm5719-llvm-bd4bf3d4f794561f5869f33f574b6ddc4fe336bf.zip | |
llvm-mc: Evaluation for relocatable expressions.
llvm-svn: 74496
Diffstat (limited to 'llvm/tools/llvm-mc/AsmExpr.h')
| -rw-r--r-- | llvm/tools/llvm-mc/AsmExpr.h | 10 |
1 files changed, 9 insertions, 1 deletions
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; } }; |

