Skip to content

Commit 3f873e9

Browse files
committed
[llvm-objcopy] Internalize some symbols
1 parent 4882cac commit 3f873e9

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

llvm/tools/llvm-objcopy/llvm-objcopy.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@
5959
#include <system_error>
6060
#include <utility>
6161

62-
namespace llvm {
63-
namespace objcopy {
62+
using namespace llvm;
63+
using namespace llvm::objcopy;
64+
using namespace llvm::object;
6465

6566
// The name this program was invoked as.
66-
StringRef ToolName;
67+
static StringRef ToolName;
6768

68-
ErrorSuccess reportWarning(Error E) {
69+
static ErrorSuccess reportWarning(Error E) {
6970
assert(E);
7071
WithColor::warning(errs(), ToolName) << toString(std::move(E)) << '\n';
7172
return Error::success();
@@ -95,13 +96,6 @@ static Expected<DriverConfig> getDriverConfig(ArrayRef<const char *> Args) {
9596
return parseObjcopyOptions(Args, reportWarning);
9697
}
9798

98-
} // end namespace objcopy
99-
} // end namespace llvm
100-
101-
using namespace llvm;
102-
using namespace llvm::object;
103-
using namespace llvm::objcopy;
104-
10599
// For regular archives this function simply calls llvm::writeArchive,
106100
// For thin archives it writes the archive file itself as well as its members.
107101
static Error deepWriteArchive(StringRef ArcName,

0 commit comments

Comments
 (0)