aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-mc/AsmExpr.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-30 01:49:52 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-30 01:49:52 +0000
commit15d170709608e2f1efcada74c297c10c8c71fdcf (patch)
treefb8cb7f88ebf927bad158feab87b50974bbafacb /tools/llvm-mc/AsmExpr.h
parent9b27622ecb00a4e4b23fe501d11f344c7b9ba7ed (diff)
downloadexternal_llvm-15d170709608e2f1efcada74c297c10c8c71fdcf.zip
external_llvm-15d170709608e2f1efcada74c297c10c8c71fdcf.tar.gz
external_llvm-15d170709608e2f1efcada74c297c10c8c71fdcf.tar.bz2
llvm-mc: Evaluation for relocatable expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/AsmExpr.h')
-rw-r--r--tools/llvm-mc/AsmExpr.h10
1 files changed, 9 insertions, 1 deletions
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 @@ 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; }
};