diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-03-09 16:23:46 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-03-09 16:23:46 +0000 |
commit | f044d3f93b1068059a4cf13949440ad81f501278 (patch) | |
tree | 2b4dcf46358719512014b2f8da45b292185a384a /llvm/tools/llvm-profdata/llvm-profdata.cpp | |
parent | db4995a1976b4e7f1fc8d655e586fccf8016f492 (diff) | |
download | bcm5719-llvm-f044d3f93b1068059a4cf13949440ad81f501278.tar.gz bcm5719-llvm-f044d3f93b1068059a4cf13949440ad81f501278.zip |
Make helper functions static.
Found by -Wmissing-prototypes. NFC.
llvm-svn: 231664
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r-- | llvm/tools/llvm-profdata/llvm-profdata.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index 0137e35c52f..2e8c640bf0c 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -38,8 +38,8 @@ static void exitWithError(const Twine &Message, StringRef Whence = "") { enum ProfileKinds { instr, sample }; -void mergeInstrProfile(const cl::list<std::string> &Inputs, - StringRef OutputFilename) { +static void mergeInstrProfile(const cl::list<std::string> &Inputs, + StringRef OutputFilename) { if (OutputFilename.compare("-") == 0) exitWithError("Cannot write indexed profdata format to stdout."); @@ -65,9 +65,9 @@ void mergeInstrProfile(const cl::list<std::string> &Inputs, Writer.write(Output); } -void mergeSampleProfile(const cl::list<std::string> &Inputs, - StringRef OutputFilename, - sampleprof::SampleProfileFormat OutputFormat) { +static void mergeSampleProfile(const cl::list<std::string> &Inputs, + StringRef OutputFilename, + sampleprof::SampleProfileFormat OutputFormat) { using namespace sampleprof; auto WriterOrErr = SampleProfileWriter::create(OutputFilename, OutputFormat); if (std::error_code EC = WriterOrErr.getError()) @@ -97,7 +97,7 @@ void mergeSampleProfile(const cl::list<std::string> &Inputs, Writer->write(ProfileMap); } -int merge_main(int argc, const char *argv[]) { +static int merge_main(int argc, const char *argv[]) { cl::list<std::string> Inputs(cl::Positional, cl::Required, cl::OneOrMore, cl::desc("<filenames...>")); @@ -130,9 +130,9 @@ int merge_main(int argc, const char *argv[]) { return 0; } -int showInstrProfile(std::string Filename, bool ShowCounts, - bool ShowAllFunctions, std::string ShowFunction, - raw_fd_ostream &OS) { +static int showInstrProfile(std::string Filename, bool ShowCounts, + bool ShowAllFunctions, std::string ShowFunction, + raw_fd_ostream &OS) { auto ReaderOrErr = InstrProfReader::create(Filename); if (std::error_code EC = ReaderOrErr.getError()) exitWithError(EC.message(), Filename); @@ -183,9 +183,9 @@ int showInstrProfile(std::string Filename, bool ShowCounts, return 0; } -int showSampleProfile(std::string Filename, bool ShowCounts, - bool ShowAllFunctions, std::string ShowFunction, - raw_fd_ostream &OS) { +static int showSampleProfile(std::string Filename, bool ShowCounts, + bool ShowAllFunctions, std::string ShowFunction, + raw_fd_ostream &OS) { using namespace sampleprof; auto ReaderOrErr = SampleProfileReader::create(Filename, getGlobalContext()); if (std::error_code EC = ReaderOrErr.getError()) @@ -201,7 +201,7 @@ int showSampleProfile(std::string Filename, bool ShowCounts, return 0; } -int show_main(int argc, const char *argv[]) { +static int show_main(int argc, const char *argv[]) { cl::opt<std::string> Filename(cl::Positional, cl::Required, cl::desc("<profdata-file>")); |