diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-12 21:00:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-12 21:00:45 +0000 |
commit | a0e36d55c495b3325805c659ac365b5faea84e34 (patch) | |
tree | 90eb96e87abdce6b8f367ca926a2b666a79d8e96 /include/llvm/MC/MCExpr.h | |
parent | 8315a357e48f2eeb4fa929168d3cb65924d9893e (diff) | |
download | llvm-a0e36d55c495b3325805c659ac365b5faea84e34.tar.gz llvm-a0e36d55c495b3325805c659ac365b5faea84e34.tar.bz2 llvm-a0e36d55c495b3325805c659ac365b5faea84e34.tar.xz |
MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCExpr.h')
-rw-r--r-- | include/llvm/MC/MCExpr.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h index 9daddb2923..5f8163f19e 100644 --- a/include/llvm/MC/MCExpr.h +++ b/include/llvm/MC/MCExpr.h @@ -67,7 +67,7 @@ public: /// values. If not given, then only non-symbolic expressions will be /// evaluated. /// @result - True on success. - bool EvaluateAsAbsolute(int64_t &Res, MCAsmLayout *Layout = 0) const; + bool EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout *Layout = 0) const; /// EvaluateAsRelocatable - Try to evaluate the expression to a relocatable /// value, i.e. an expression of the fixed form (a - b + constant). @@ -75,13 +75,13 @@ public: /// @param Res - The relocatable value, if evaluation succeeds. /// @param Layout - The assembler layout object to use for evaluating values. /// @result - True on success. - bool EvaluateAsRelocatable(MCValue &Res, MCAsmLayout *Layout = 0) const; + bool EvaluateAsRelocatable(MCValue &Res, const MCAsmLayout *Layout = 0) const; /// @} static bool classof(const MCExpr *) { return true; } }; - + inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) { E.print(OS); return OS; @@ -351,12 +351,12 @@ protected: MCTargetExpr() : MCExpr(Target) {} virtual ~MCTargetExpr() {} public: - + virtual void PrintImpl(raw_ostream &OS) const = 0; virtual bool EvaluateAsRelocatableImpl(MCValue &Res, - MCAsmLayout *Layout) const = 0; + const MCAsmLayout *Layout) const = 0; + - static bool classof(const MCExpr *E) { return E->getKind() == MCExpr::Target; } |