[llvm] 3f873e9 - [llvm-objcopy] Internalize some symbols
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 23:49:31 PDT 2021
Author: Fangrui Song
Date: 2021-06-21T23:49:25-07:00
New Revision: 3f873e9b51781f58e89806639c8e19eea5610ff7
URL: https://github.com/llvm/llvm-project/commit/3f873e9b51781f58e89806639c8e19eea5610ff7
DIFF: https://github.com/llvm/llvm-project/commit/3f873e9b51781f58e89806639c8e19eea5610ff7.diff
LOG: [llvm-objcopy] Internalize some symbols
Added:
Modified:
llvm/tools/llvm-objcopy/llvm-objcopy.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
index 559f99bf1091..a4d5b534301b 100644
--- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
+++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
@@ -59,13 +59,14 @@
#include <system_error>
#include <utility>
-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<DriverConfig> getDriverConfig(ArrayRef<const char *> 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,
More information about the llvm-commits
mailing list