From 9b85d7e166ac51a1cea66129edbfbc83fc5332b3 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 13 Jan 2022 10:24:39 -0800 Subject: [PATCH] MC: Use SmallVector::clear() instead of set_size(0) --- llvm/lib/MC/MachObjectWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 5105c5d8164d..56bb03ad8d42 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -765,7 +765,7 @@ uint64_t MachObjectWriter::writeObject(MCAssembler &Asm, MCDataFragment *Frag = dyn_cast_or_null( &*CGProfileSection->getFragmentList().begin()); assert(Frag && "call graph profile section not reserved"); - Frag->getContents().set_size(0); + Frag->getContents().clear(); raw_svector_ostream OS(Frag->getContents()); for (const MCAssembler::CGProfileEntry &CGPE : Asm.CGProfile) { uint32_t FromIndex = CGPE.From->getSymbol().getIndex();