1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Use std::fill instead of memset to initialize an array to avoid hardcoded count and a multiply. The outputed code is identical.

llvm-svn: 254842
This commit is contained in:
Craig Topper 2015-12-05 07:13:25 +00:00
parent 52cfcde3fb
commit 250c981bf4

View File

@ -1293,7 +1293,7 @@ protected:
/// Remove all register classes.
void clearRegisterClasses() {
memset(RegClassForVT, 0,MVT::LAST_VALUETYPE * sizeof(TargetRegisterClass*));
std::fill(std::begin(RegClassForVT), std::end(RegClassForVT), nullptr);
AvailableRegClasses.clear();
}