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 | 968b36a0bd7b421d334216cd757bcd7ef5c315f8 (patch) | |
| tree | b417f4d7c811379c57d1fd731987dca589efcfe8 /llvm/lib | |
| parent | 921e79f5eb4a5114cf532f053bdfd953172dd0cc (diff) | |
| download | bcm5719-llvm-968b36a0bd7b421d334216cd757bcd7ef5c315f8.tar.gz bcm5719-llvm-968b36a0bd7b421d334216cd757bcd7ef5c315f8.zip | |
MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...
llvm-svn: 98380
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86MCTargetExpr.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86MCTargetExpr.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 0ca2ad8761b..8d84f53037d 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -145,7 +145,7 @@ void MCTargetExpr::Anchor() {} /* *** */ -bool MCExpr::EvaluateAsAbsolute(int64_t &Res, MCAsmLayout *Layout) const { +bool MCExpr::EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout *Layout) const { MCValue Value; if (!EvaluateAsRelocatable(Value, Layout) || !Value.isAbsolute()) @@ -177,7 +177,8 @@ static bool EvaluateSymbolicAdd(const MCValue &LHS, const MCSymbol *RHS_A, return true; } -bool MCExpr::EvaluateAsRelocatable(MCValue &Res, MCAsmLayout *Layout) const { +bool MCExpr::EvaluateAsRelocatable(MCValue &Res, + const MCAsmLayout *Layout) const { switch (getKind()) { case Target: return cast<MCTargetExpr>(this)->EvaluateAsRelocatableImpl(Res, Layout); diff --git a/llvm/lib/Target/X86/X86MCTargetExpr.cpp b/llvm/lib/Target/X86/X86MCTargetExpr.cpp index de56d313076..cfcf70221d1 100644 --- a/llvm/lib/Target/X86/X86MCTargetExpr.cpp +++ b/llvm/lib/Target/X86/X86MCTargetExpr.cpp @@ -37,7 +37,7 @@ void X86MCTargetExpr::PrintImpl(raw_ostream &OS) const { } bool X86MCTargetExpr::EvaluateAsRelocatableImpl(MCValue &Res, - MCAsmLayout *Layout) const { + const MCAsmLayout *Layout) const { // FIXME: I don't know if this is right, it followed MCSymbolRefExpr. // Evaluate recursively if this is a variable. diff --git a/llvm/lib/Target/X86/X86MCTargetExpr.h b/llvm/lib/Target/X86/X86MCTargetExpr.h index 56011eb053f..a82e142a07f 100644 --- a/llvm/lib/Target/X86/X86MCTargetExpr.h +++ b/llvm/lib/Target/X86/X86MCTargetExpr.h @@ -41,7 +41,7 @@ public: MCContext &Ctx); void PrintImpl(raw_ostream &OS) const; - bool EvaluateAsRelocatableImpl(MCValue &Res, MCAsmLayout *Layout) const; + bool EvaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout) const; }; } // end namespace llvm |

