aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
diff options
context:
space:
mode:
authorDjordje Todorovic <djordje.todorovic@syrmia.com>2020-03-10 12:06:08 +0100
committerDjordje Todorovic <djordje.todorovic@syrmia.com>2020-03-10 12:58:59 +0100
commit3e47f87e644991517f2746fd1cc4273f3fe5be70 (patch)
tree602657532d36342c3f868bae858d910cb380db3b /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
parent9b05596eff21388ae6f17cdea8df0538dc630441 (diff)
downloadllvm-3e47f87e644991517f2746fd1cc4273f3fe5be70.zip
llvm-3e47f87e644991517f2746fd1cc4273f3fe5be70.tar.gz
llvm-3e47f87e644991517f2746fd1cc4273f3fe5be70.tar.bz2
[NFC][llvm-dwarfdump] Always use 'const Twine &'
According to the Twine.h comment, the Twines should only be used as const references in arguments. Differential Revision: https://reviews.llvm.org/D75727
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r--llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 374bdd4..28ede2e 100644
--- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -278,8 +278,8 @@ static bool filterArch(ObjectFile &Obj) {
return false;
}
-using HandlerFn = std::function<bool(ObjectFile &, DWARFContext &DICtx, Twine,
- raw_ostream &)>;
+using HandlerFn = std::function<bool(ObjectFile &, DWARFContext &DICtx,
+ const Twine &, raw_ostream &)>;
/// Print only DIEs that have a certain name.
static bool filterByName(const StringSet<> &Names, DWARFDie Die,
@@ -411,10 +411,10 @@ static bool lookup(ObjectFile &Obj, DWARFContext &DICtx, uint64_t Address,
}
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 dumpObjectFile(ObjectFile &Obj, DWARFContext &DICtx, Twine Filename,
}
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;