From e1b5c7ac7737c434d88e069fea382083aed75980 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 19 May 2017 07:37:25 +0000 Subject: [PATCH] [APInt] Use b.negate() in place of b = -std::move(b). NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303411 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/APInt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 894e5571f8a..d1bc2835de8 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -2015,7 +2015,7 @@ inline APInt operator-(APInt a, const APInt &b) { } inline APInt operator-(const APInt &a, APInt &&b) { - b = -std::move(b); + b.negate(); b += a; return std::move(b); } @@ -2026,7 +2026,7 @@ inline APInt operator-(APInt a, uint64_t RHS) { } inline APInt operator-(uint64_t LHS, APInt b) { - b = -std::move(b); + b.negate(); b += LHS; return b; } -- 2.50.1