From e491ea46302d2d5d164ce312ed51438880d6e4f3 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 17 Dec 2010 02:05:45 +0000 Subject: [PATCH] MC/Expr: Simplify. llvm-svn: 122023 --- llvm/include/llvm/MC/MCExpr.h | 5 ++++- llvm/lib/MC/MCExpr.cpp | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/llvm/include/llvm/MC/MCExpr.h b/llvm/include/llvm/MC/MCExpr.h index 6fa5e17f9a63..55e3f46a8976 100644 --- a/llvm/include/llvm/MC/MCExpr.h +++ b/llvm/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/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index b66736917236..4465104bfe5e 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/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,