[llvm-objcopy] Remove unused internal helper function template makeStringError. NFC
authorThomas Köppe <tkoeppe@google.com>
Sat, 15 Jul 2023 18:22:53 +0000 (11:22 -0700)
committerFangrui Song <i@maskray.me>
Sat, 15 Jul 2023 18:22:54 +0000 (11:22 -0700)
Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D153671

llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp

index 70bf97b..dfe843e 100644 (file)
@@ -172,13 +172,6 @@ static std::unique_ptr<Writer> createWriter(const CommonConfig &Config,
   }
 }
 
-template <class... Ts>
-static Error makeStringError(std::error_code EC, const Twine &Msg,
-                             Ts &&...Args) {
-  std::string FullMsg = (EC.message() + ": " + Msg).str();
-  return createStringError(EC, FullMsg.c_str(), std::forward<Ts>(Args)...);
-}
-
 static Error dumpSectionToFile(StringRef SecName, StringRef Filename,
                                Object &Obj) {
   for (auto &Sec : Obj.sections()) {