From 8f714fedba35bc454ff372f084090f14a25c8933 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 17 Dec 2010 02:05:45 +0000 Subject: [PATCH] MC/Expr: Simplify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122023 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCExpr.h | 5 ++++- lib/MC/MCExpr.cpp | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h index 6fa5e17f9a6..55e3f46a897 100644 --- a/include/llvm/MC/MCExpr.h +++ b/include/llvm/MC/MCExpr.h @@ -93,7 +93,10 @@ 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, const MCAsmLayout *Layout = 0) const; + bool EvaluateAsRelocatable(MCValue &Res, + const MCAsmLayout *Layout = 0) const { + return EvaluateAsRelocatableImpl(Res, Layout, 0, false); + } /// @} diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index b6673691723..4465104bfe5 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -355,14 +355,6 @@ static bool EvaluateSymbolicAdd(const MCAsmLayout *Layout, return true; } -bool MCExpr::EvaluateAsRelocatable(MCValue &Res, - const MCAsmLayout *Layout) const { - if (Layout) - return EvaluateAsRelocatableImpl(Res, Layout, 0, false); - else - return EvaluateAsRelocatableImpl(Res, 0, 0, false); -} - bool MCExpr::EvaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const SectionAddrMap *Addrs,