summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-09-11 22:04:13 +0000
committerRui Ueyama <ruiu@google.com>2017-09-11 22:04:13 +0000
commitc16fd25c29f0c61006295e90c5a80aa260bb95f4 (patch)
tree12dcd368c3e72467d3e6173b2efd90ba6c9b4ffa
parent95114b497fec9347a4e1025137bfd6a0635f2bc2 (diff)
downloadbcm5719-llvm-c16fd25c29f0c61006295e90c5a80aa260bb95f4.tar.gz
bcm5719-llvm-c16fd25c29f0c61006295e90c5a80aa260bb95f4.zip
Make the scope of an anonymous namespace as narrow as possible.
llvm-svn: 312962
-rw-r--r--lld/MinGW/Driver.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index 2417eb04a2e..ccd534dc851 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -30,8 +30,6 @@
using namespace lld;
using namespace llvm;
-namespace {
-
// Create OptTable
enum {
OPT_INVALID = 0,
@@ -41,7 +39,7 @@ enum {
};
// Create prefix string literals used in Options.td
-#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
+#define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE;
#include "Options.inc"
#undef PREFIX
@@ -54,12 +52,12 @@ static const opt::OptTable::Info InfoTable[] = {
#undef OPTION
};
+namespace {
class COFFLdOptTable : public opt::OptTable {
public:
COFFLdOptTable() : OptTable(InfoTable, false) {}
opt::InputArgList parse(ArrayRef<const char *> Argv);
};
-
} // namespace
LLVM_ATTRIBUTE_NORETURN static void error(const Twine &Msg) {
OpenPOWER on IntegriCloud