diff options
| author | Craig Topper <craig.topper@gmail.com> | 2016-04-08 07:10:46 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2016-04-08 07:10:46 +0000 |
| commit | 00230805f2a469f227ef062865074d8905fdd661 (patch) | |
| tree | ff78f5c508c067697ab68d9e4a28118b9f400fc3 /llvm/lib/CodeGen | |
| parent | 24c4f28ac978ca699c44bc663cd0b6424528eee6 (diff) | |
| download | bcm5719-llvm-00230805f2a469f227ef062865074d8905fdd661.tar.gz bcm5719-llvm-00230805f2a469f227ef062865074d8905fdd661.zip | |
Use std::fill to simplify some code. NFC
llvm-svn: 265771
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 747950f948e..7ec7006478a 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -790,8 +790,9 @@ void TargetLoweringBase::initActions() { memset(TruncStoreActions, 0, sizeof(TruncStoreActions)); memset(IndexedModeActions, 0, sizeof(IndexedModeActions)); memset(CondCodeActions, 0, sizeof(CondCodeActions)); - memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*)); - memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray)); + std::fill(std::begin(RegClassForVT), std::end(RegClassForVT), nullptr); + std::fill(std::begin(TargetDAGCombineArray), + std::end(TargetDAGCombineArray), 0); // Set default actions for various operations. for (MVT VT : MVT::all_valuetypes()) { |

