OSDN Git Service

[APInt] Remove add and sub functions from APIntOps namespace.
authorCraig Topper <craig.topper@gmail.com>
Mon, 6 Mar 2017 04:35:01 +0000 (04:35 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 6 Mar 2017 04:35:01 +0000 (04:35 +0000)
They aren't used in tree and using the overloaded operators has more optimization opportunities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296995 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APInt.h

index c57bac4..2d3f620 100644 (file)
@@ -1965,16 +1965,6 @@ inline APInt urem(const APInt &LHS, const APInt &RHS) { return LHS.urem(RHS); }
 /// Performs multiplication on APInt values.
 inline APInt mul(const APInt &LHS, const APInt &RHS) { return LHS * RHS; }
 
-/// \brief Function for addition operation.
-///
-/// Performs addition on APInt values.
-inline APInt add(const APInt &LHS, const APInt &RHS) { return LHS + RHS; }
-
-/// \brief Function for subtraction operation.
-///
-/// Performs subtraction on APInt values.
-inline APInt sub(const APInt &LHS, const APInt &RHS) { return LHS - RHS; }
-
 } // End of APIntOps namespace
 
 // See friend declaration above. This additional declaration is required in