diff --git a/tools/llvm-objcopy/llvm-objcopy.cpp b/tools/llvm-objcopy/llvm-objcopy.cpp index 559f99bf109..a4d5b534301 100644 --- a/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/tools/llvm-objcopy/llvm-objcopy.cpp @@ -59,13 +59,14 @@ #include #include -namespace llvm { -namespace objcopy { +using namespace llvm; +using namespace llvm::objcopy; +using namespace llvm::object; // The name this program was invoked as. -StringRef ToolName; +static StringRef ToolName; -ErrorSuccess reportWarning(Error E) { +static ErrorSuccess reportWarning(Error E) { assert(E); WithColor::warning(errs(), ToolName) << toString(std::move(E)) << '\n'; return Error::success(); @@ -95,13 +96,6 @@ static Expected getDriverConfig(ArrayRef Args) { return parseObjcopyOptions(Args, reportWarning); } -} // end namespace objcopy -} // end namespace llvm - -using namespace llvm; -using namespace llvm::object; -using namespace llvm::objcopy; - // For regular archives this function simply calls llvm::writeArchive, // For thin archives it writes the archive file itself as well as its members. static Error deepWriteArchive(StringRef ArcName,