diff options
author | Zachary Turner <zturner@google.com> | 2017-10-11 23:54:34 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-10-11 23:54:34 +0000 |
commit | 41a9ee98f9fb16d463667e28e56fb42c962e91ce (patch) | |
tree | 3190cb8adff093b171c4393d18d4c136b8a1195b /llvm/tools | |
parent | c18c12e3850b5a4354d19c67b89b42220b8ae4c8 (diff) | |
download | bcm5719-llvm-41a9ee98f9fb16d463667e28e56fb42c962e91ce.tar.gz bcm5719-llvm-41a9ee98f9fb16d463667e28e56fb42c962e91ce.zip |
Revert "[ADT] Make Twine's copy constructor private."
This reverts commit 4e4ee1c507e2707bb3c208e1e1b6551c3015cbf5.
This is failing due to some code that isn't built on MSVC
so I didn't catch. Not immediately obvious how to fix this
at first glance, so I'm reverting for now.
llvm-svn: 315536
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-nm/llvm-nm.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/llvm-objcopy/Object.cpp | 6 | ||||
-rw-r--r-- | llvm/tools/llvm-objcopy/Object.h | 6 | ||||
-rw-r--r-- | llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-objcopy/llvm-objcopy.h | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp index 6b9ae463979..4ad0d95d67f 100644 --- a/llvm/tools/llvm-nm/llvm-nm.cpp +++ b/llvm/tools/llvm-nm/llvm-nm.cpp @@ -195,12 +195,12 @@ bool HadError = false; std::string ToolName; } // anonymous namespace -static void error(const Twine &Message, const Twine &Path = Twine()) { +static void error(Twine Message, Twine Path = Twine()) { HadError = true; errs() << ToolName << ": " << Path << ": " << Message << ".\n"; } -static bool error(std::error_code EC, const Twine &Path = Twine()) { +static bool error(std::error_code EC, Twine Path = Twine()) { if (EC) { error(EC.message(), Path); return true; diff --git a/llvm/tools/llvm-objcopy/Object.cpp b/llvm/tools/llvm-objcopy/Object.cpp index f4c159cd1cb..f9acf001ae9 100644 --- a/llvm/tools/llvm-objcopy/Object.cpp +++ b/llvm/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/llvm/tools/llvm-objcopy/Object.h b/llvm/tools/llvm-objcopy/Object.h index d266912db0b..f6088434805 100644 --- a/llvm/tools/llvm-objcopy/Object.h +++ b/llvm/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/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp index 9fc2897959c..7f55a434b33 100644 --- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/llvm/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/llvm/tools/llvm-objcopy/llvm-objcopy.h b/llvm/tools/llvm-objcopy/llvm-objcopy.h index d30b43a46a4..de7bf367ac8 100644 --- a/llvm/tools/llvm-objcopy/llvm-objcopy.h +++ b/llvm/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) |