diff options
Diffstat (limited to 'tools/llvm-objcopy')
-rw-r--r-- | tools/llvm-objcopy/Object.cpp | 6 | ||||
-rw-r--r-- | tools/llvm-objcopy/Object.h | 6 | ||||
-rw-r--r-- | tools/llvm-objcopy/llvm-objcopy.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-objcopy/llvm-objcopy.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/llvm-objcopy/Object.cpp b/tools/llvm-objcopy/Object.cpp index f4c159cd1cb..f9acf001ae9 100644 --- a/tools/llvm-objcopy/Object.cpp +++ b/tools/llvm-objcopy/Object.cpp @@ -428,15 +428,15 @@ void initRelocations(RelocationSection<ELFT> *Relocs, } } -SectionBase *SectionTableRef::getSection(uint16_t Index, const Twine &ErrMsg) { +SectionBase *SectionTableRef::getSection(uint16_t Index, Twine ErrMsg) { if (Index == SHN_UNDEF || Index > Sections.size()) error(ErrMsg); return Sections[Index - 1].get(); } template <class T> -T *SectionTableRef::getSectionOfType(uint16_t Index, const Twine &IndexErrMsg, - const Twine &TypeErrMsg) { +T *SectionTableRef::getSectionOfType(uint16_t Index, Twine IndexErrMsg, + Twine TypeErrMsg) { if (T *Sec = llvm::dyn_cast<T>(getSection(Index, IndexErrMsg))) return Sec; error(TypeErrMsg); diff --git a/tools/llvm-objcopy/Object.h b/tools/llvm-objcopy/Object.h index d266912db0b..f6088434805 100644 --- a/tools/llvm-objcopy/Object.h +++ b/tools/llvm-objcopy/Object.h @@ -29,11 +29,11 @@ public: : Sections(Secs) {} SectionTableRef(const SectionTableRef &) = default; - SectionBase *getSection(uint16_t Index, const llvm::Twine &ErrMsg); + SectionBase *getSection(uint16_t Index, llvm::Twine ErrMsg); template <class T> - T *getSectionOfType(uint16_t Index, const llvm::Twine &IndexErrMsg, - const llvm::Twine &TypeErrMsg); + T *getSectionOfType(uint16_t Index, llvm::Twine IndexErrMsg, + llvm::Twine TypeErrMsg); }; class SectionBase { diff --git a/tools/llvm-objcopy/llvm-objcopy.cpp b/tools/llvm-objcopy/llvm-objcopy.cpp index 9fc2897959c..7f55a434b33 100644 --- a/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/tools/llvm-objcopy/llvm-objcopy.cpp @@ -27,7 +27,7 @@ static StringRef ToolName; namespace llvm { -LLVM_ATTRIBUTE_NORETURN void error(const Twine &Message) { +LLVM_ATTRIBUTE_NORETURN void error(Twine Message) { errs() << ToolName << ": " << Message << ".\n"; errs().flush(); exit(1); diff --git a/tools/llvm-objcopy/llvm-objcopy.h b/tools/llvm-objcopy/llvm-objcopy.h index d30b43a46a4..de7bf367ac8 100644 --- a/tools/llvm-objcopy/llvm-objcopy.h +++ b/tools/llvm-objcopy/llvm-objcopy.h @@ -14,7 +14,7 @@ namespace llvm { -LLVM_ATTRIBUTE_NORETURN extern void error(const Twine &Message); +LLVM_ATTRIBUTE_NORETURN extern void error(Twine Message); // This is taken from llvm-readobj. // [see here](llvm/tools/llvm-readobj/llvm-readobj.h:38) |