OSDN Git Service

Bring back APInt self-move assignment check for MSVC only
authorReid Kleckner <rnk@google.com>
Tue, 24 Apr 2018 21:41:50 +0000 (21:41 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 24 Apr 2018 21:41:50 +0000 (21:41 +0000)
commit13059298290a2759fa84acfd160e30a1dbe204d7
treeea677721f86ef3568c069fa6d91a5423c89fce79
parente843f71e41fbc69702daafedc79b05876be0d659
Bring back APInt self-move assignment check for MSVC only

Summary:
It was removed about a year ago in r300477. Bring it back, along with
its unittest, when the MSVC STL is in use. The MSVC STL performs
self-assignment in std::shuffle. These days, llvm::sort calls
std::shuffle when expensive checks are enabled to help find
non-determinism bugs.

Reviewers: craig.topper, chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D46028

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330776 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h
unittests/ADT/APIntTest.cpp