diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-20 09:18:37 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-20 09:18:37 +0000 |
commit | e3bf66476f4b8d1fb5cfeda550f6f27937453969 (patch) | |
tree | 42d7542db18c1836c3abd0473fad4fbd9379776a /include | |
parent | 88a127497fe9353d36daee1439fbe451f85b65fa (diff) |
[ProfileData] Thread unique_ptr through the summary builder to avoid leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ProfileData/ProfileCommon.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ProfileData/ProfileCommon.h b/include/llvm/ProfileData/ProfileCommon.h index f5b940554c8..e43d307273a 100644 --- a/include/llvm/ProfileData/ProfileCommon.h +++ b/include/llvm/ProfileData/ProfileCommon.h @@ -74,7 +74,7 @@ public: InstrProfSummaryBuilder(std::vector<uint32_t> Cutoffs) : ProfileSummaryBuilder(Cutoffs), MaxInternalBlockCount(0) {} void addRecord(const InstrProfRecord &); - ProfileSummary *getSummary(); + std::unique_ptr<ProfileSummary> getSummary(); }; class SampleProfileSummaryBuilder final : public ProfileSummaryBuilder { @@ -83,7 +83,7 @@ public: void addRecord(const sampleprof::FunctionSamples &FS); SampleProfileSummaryBuilder(std::vector<uint32_t> Cutoffs) : ProfileSummaryBuilder(Cutoffs) {} - ProfileSummary *getSummary(); + std::unique_ptr<ProfileSummary> getSummary(); }; // This is called when a count is seen in the profile. |