[lld] r326347 - Inline a trivial function. NFC.
    Rui Ueyama via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Feb 28 10:25:00 PST 2018
    
    
  
Author: ruiu
Date: Wed Feb 28 10:25:00 2018
New Revision: 326347
URL: http://llvm.org/viewvc/llvm-project?rev=326347&view=rev
Log:
Inline a trivial function. NFC.
Modified:
    lld/trunk/ELF/ScriptParser.cpp
Modified: lld/trunk/ELF/ScriptParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptParser.cpp?rev=326347&r1=326346&r2=326347&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptParser.cpp (original)
+++ lld/trunk/ELF/ScriptParser.cpp Wed Feb 28 10:25:00 2018
@@ -157,10 +157,6 @@ static ExprValue sub(ExprValue A, ExprVa
   return {A.Sec, false, A.getSectionOffset() - B.getValue(), A.Loc};
 }
 
-static ExprValue mul(ExprValue A, ExprValue B) {
-  return A.getValue() * B.getValue();
-}
-
 static ExprValue div(ExprValue A, ExprValue B) {
   if (uint64_t BV = B.getValue())
     return A.getValue() / BV;
@@ -808,7 +804,7 @@ static Expr combine(StringRef Op, Expr L
   if (Op == "-")
     return [=] { return sub(L(), R()); };
   if (Op == "*")
-    return [=] { return mul(L(), R()); };
+    return [=] { return L().getValue() * R().getValue(); };
   if (Op == "/")
     return [=] { return div(L(), R()); };
   if (Op == "<<")
    
    
More information about the llvm-commits
mailing list