[ProfileData] Thread unique_ptr through the summary builder to avoid leaks.
llvm-svn: 270195
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index 8ffdc5b..a7d8fcf 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -617,7 +617,7 @@
InstrProfSummaryBuilder Builder(ProfileSummaryBuilder::DefaultCutoffs);
// FIXME: This only computes an empty summary. Need to call addRecord for
// all InstrProfRecords to get the correct summary.
- this->Summary.reset(Builder.getSummary());
+ this->Summary = Builder.getSummary();
return Cur;
}
}