diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h index 47487c9342594..6ffead4f13aeb 100644 --- a/llvm/include/llvm/ProfileData/MemProf.h +++ b/llvm/include/llvm/ProfileData/MemProf.h @@ -416,7 +416,7 @@ struct IndexedMemProfRecord { // the last entry in the list with the same function GUID. llvm::SmallVector CallSiteIds; - void clear() { AllocSites.clear(); } + void clear() { *this = IndexedMemProfRecord(); } void merge(const IndexedMemProfRecord &Other) { // TODO: Filter out duplicates which may occur if multiple memprof