From: Craig Topper Date: Fri, 8 Apr 2016 07:10:46 +0000 (+0000) Subject: Use std::fill to simplify some code. NFC X-Git-Tag: llvmorg-3.9.0-rc1~9642 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00230805f2a469f227ef062865074d8905fdd661;p=platform%2Fupstream%2Fllvm.git Use std::fill to simplify some code. NFC llvm-svn: 265771 --- diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 747950f..7ec7006 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()) {