From 4c5e43da7792f75567b693105cc53e3f1992ad98 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Wed, 8 Apr 2015 08:55:49 -0700 Subject: Update aosp/master llvm for rebase to r233350 Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49 --- tools/llvm-profdata/llvm-profdata.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'tools/llvm-profdata') diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index 0137e35..1bfdb18 100644 --- a/tools/llvm-profdata/llvm-profdata.cpp +++ b/tools/llvm-profdata/llvm-profdata.cpp @@ -22,6 +22,7 @@ #include "llvm/Support/Format.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Signals.h" #include "llvm/Support/raw_ostream.h" @@ -38,8 +39,8 @@ static void exitWithError(const Twine &Message, StringRef Whence = "") { enum ProfileKinds { instr, sample }; -void mergeInstrProfile(const cl::list &Inputs, - StringRef OutputFilename) { +static void mergeInstrProfile(const cl::list &Inputs, + StringRef OutputFilename) { if (OutputFilename.compare("-") == 0) exitWithError("Cannot write indexed profdata format to stdout."); @@ -65,9 +66,9 @@ void mergeInstrProfile(const cl::list &Inputs, Writer.write(Output); } -void mergeSampleProfile(const cl::list &Inputs, - StringRef OutputFilename, - sampleprof::SampleProfileFormat OutputFormat) { +static void mergeSampleProfile(const cl::list &Inputs, + StringRef OutputFilename, + sampleprof::SampleProfileFormat OutputFormat) { using namespace sampleprof; auto WriterOrErr = SampleProfileWriter::create(OutputFilename, OutputFormat); if (std::error_code EC = WriterOrErr.getError()) @@ -97,7 +98,7 @@ void mergeSampleProfile(const cl::list &Inputs, Writer->write(ProfileMap); } -int merge_main(int argc, const char *argv[]) { +static int merge_main(int argc, const char *argv[]) { cl::list Inputs(cl::Positional, cl::Required, cl::OneOrMore, cl::desc("")); @@ -130,9 +131,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 +184,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 +202,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 Filename(cl::Positional, cl::Required, cl::desc("")); -- cgit v1.1