MC: Use SmallVector::clear() instead of set_size(0)

This commit is contained in:
Duncan P. N. Exon Smith 2022-01-13 10:24:39 -08:00
parent 53cb3a7bb4
commit 9b85d7e166
1 changed files with 1 additions and 1 deletions

View File

@ -765,7 +765,7 @@ uint64_t MachObjectWriter::writeObject(MCAssembler &Asm,
MCDataFragment *Frag = dyn_cast_or_null<MCDataFragment>(
&*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();