From 2db57b44dea55f780dfce8ed786c0696deb8dd93 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Tue, 26 Aug 2014 03:33:26 +0000 Subject: [PATCH] AArch64: use std::fill instead of memset Followup based on review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216436 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64CollectLOH.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/AArch64/AArch64CollectLOH.cpp b/lib/Target/AArch64/AArch64CollectLOH.cpp index 0ffa0334850..87b545b186b 100644 --- a/lib/Target/AArch64/AArch64CollectLOH.cpp +++ b/lib/Target/AArch64/AArch64CollectLOH.cpp @@ -293,7 +293,7 @@ static void initReachingDef(MachineFunction &MF, for (MachineBasicBlock &MBB : MF) { auto &BBGen = Gen[&MBB]; BBGen = make_unique(NbReg); - memset(BBGen.get(), 0, sizeof(const MachineInstr *) * NbReg); + std::fill(BBGen.get(), BBGen.get() + NbReg, nullptr); BitVector &BBKillSet = Kill[&MBB]; BBKillSet.resize(NbReg);