diff --git a/llvm/tools/llvm-dwarfdump/Statistics.cpp b/llvm/tools/llvm-dwarfdump/Statistics.cpp --- a/llvm/tools/llvm-dwarfdump/Statistics.cpp +++ b/llvm/tools/llvm-dwarfdump/Statistics.cpp @@ -502,7 +502,7 @@ /// useful, only the delta between compiling the same program with different /// compilers is. bool collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx, - Twine Filename, raw_ostream &OS) { + const Twine &Filename, raw_ostream &OS) { StringRef FormatName = Obj.getFileFormatName(); GlobalStats GlobalStats; LocationStats LocStats; diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -278,8 +278,8 @@ return false; } -using HandlerFn = std::function; +using HandlerFn = std::function; /// Print only DIEs that have a certain name. static bool filterByName(const StringSet<> &Names, DWARFDie Die, @@ -411,10 +411,10 @@ } bool collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx, - Twine Filename, raw_ostream &OS); + const Twine &Filename, raw_ostream &OS); -static bool dumpObjectFile(ObjectFile &Obj, DWARFContext &DICtx, Twine Filename, - raw_ostream &OS) { +static bool dumpObjectFile(ObjectFile &Obj, DWARFContext &DICtx, + const Twine &Filename, raw_ostream &OS) { logAllUnhandledErrors(DICtx.loadRegisterInfo(Obj), errs(), Filename.str() + ": "); // The UUID dump already contains all the same information. @@ -448,7 +448,7 @@ } static bool verifyObjectFile(ObjectFile &Obj, DWARFContext &DICtx, - Twine Filename, raw_ostream &OS) { + const Twine &Filename, raw_ostream &OS) { // Verify the DWARF and exit with non-zero exit status if verification // fails. raw_ostream &stream = Quiet ? nulls() : OS;