Index: llvm/tools/llvm-dwarfdump/SectionSizes.cpp =================================================================== --- llvm/tools/llvm-dwarfdump/SectionSizes.cpp +++ llvm/tools/llvm-dwarfdump/SectionSizes.cpp @@ -94,7 +94,7 @@ } bool collectObjectSectionSizes(ObjectFile &Obj, DWARFContext & /*DICtx*/, - Twine Filename, raw_ostream &OS) { + const Twine &Filename, raw_ostream &OS) { SectionSizes Sizes; // Get the section sizes. Index: llvm/tools/llvm-dwarfdump/Statistics.cpp =================================================================== --- llvm/tools/llvm-dwarfdump/Statistics.cpp +++ 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; Index: llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp =================================================================== --- llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -282,8 +282,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, @@ -415,13 +415,13 @@ } bool collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx, - Twine Filename, raw_ostream &OS); + const Twine &Filename, raw_ostream &OS); bool collectObjectSectionSizes(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. @@ -455,7 +455,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;