From cfb92b1bfd788e4be23adc491c4867728f71707d Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Fri, 9 Oct 2015 21:33:13 +0000 Subject: [PATCH] Remove unused function in sample profile writer API - NFC. These functions are not needed and are getting in the way of changes for implementing a table of contents for the binary format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249907 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ProfileData/SampleProfWriter.h | 23 --------------------- 1 file changed, 23 deletions(-) diff --git a/include/llvm/ProfileData/SampleProfWriter.h b/include/llvm/ProfileData/SampleProfWriter.h index d3fa7429a6d..966633fcf93 100644 --- a/include/llvm/ProfileData/SampleProfWriter.h +++ b/include/llvm/ProfileData/SampleProfWriter.h @@ -40,23 +40,6 @@ public: /// \returns true if the file was updated successfully. False, otherwise. virtual bool write(StringRef FName, const FunctionSamples &S) = 0; - /// \brief Write sample profiles in \p S for function \p F. - bool write(const Function &F, const FunctionSamples &S) { - return write(F.getName(), S); - } - - /// \brief Write all the sample profiles for all the functions in \p M. - /// - /// \returns true if the file was updated successfully. False, otherwise. - bool write(const Module &M, StringMap &P) { - for (const auto &F : M) { - StringRef Name = F.getName(); - if (!write(Name, P[Name])) - return false; - } - return true; - } - /// \brief Write all the sample profiles in the given map of samples. /// /// \returns true if the file was updated successfully. False, otherwise. @@ -87,9 +70,6 @@ public: : SampleProfileWriter(F, EC, sys::fs::F_Text), Indent(0) {} bool write(StringRef FName, const FunctionSamples &S) override; - bool write(const Module &M, StringMap &P) { - return SampleProfileWriter::write(M, P); - } private: /// Indent level to use when writing. @@ -104,9 +84,6 @@ public: SampleProfileWriterBinary(StringRef F, std::error_code &EC); bool write(StringRef F, const FunctionSamples &S) override; - bool write(const Module &M, StringMap &P) { - return SampleProfileWriter::write(M, P); - } }; } // End namespace sampleprof -- 2.34.1