summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-15 17:08:50 +0000
committerDan Gohman <gohman@apple.com>2010-04-15 17:08:50 +0000
commitb35798347ea87b8b6d36155b211016a7769f01ab (patch)
treebdf2ae210bf2fd57d31bf92e1a3d89a631ab3d58 /lib/Support
parent098406b42ca7cd05745215020ae5ed82194b7c0a (diff)
downloadllvm-b35798347ea87b8b6d36155b211016a7769f01ab.tar.gz
llvm-b35798347ea87b8b6d36155b211016a7769f01ab.tar.bz2
llvm-b35798347ea87b8b6d36155b211016a7769f01ab.tar.xz
Fix a bunch of namespace polution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Debug.cpp11
-rw-r--r--lib/Support/Timer.cpp4
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp
index eccfa0bd07..7f48f8aae7 100644
--- a/lib/Support/Debug.cpp
+++ b/lib/Support/Debug.cpp
@@ -51,12 +51,19 @@ DebugBufferSize("debug-buffer-size",
cl::init(0));
static std::string CurrentDebugType;
-static struct DebugOnlyOpt {
+
+namespace {
+
+struct DebugOnlyOpt {
void operator=(const std::string &Val) const {
DebugFlag |= !Val.empty();
CurrentDebugType = Val;
}
-} DebugOnlyOptLoc;
+};
+
+}
+
+static DebugOnlyOpt DebugOnlyOptLoc;
static cl::opt<DebugOnlyOpt, true, cl::parser<std::string> >
DebugOnly("debug-only", cl::desc("Enable a specific type of debug output"),
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp
index 4fac0737f0..481f6ba508 100644
--- a/lib/Support/Timer.cpp
+++ b/lib/Support/Timer.cpp
@@ -190,6 +190,8 @@ void TimeRecord::print(const TimeRecord &Total, raw_ostream &OS) const {
// NamedRegionTimer Implementation
//===----------------------------------------------------------------------===//
+namespace {
+
typedef StringMap<Timer> Name2TimerMap;
class Name2PairMap {
@@ -216,6 +218,8 @@ public:
}
};
+}
+
static ManagedStatic<Name2TimerMap> NamedTimers;
static ManagedStatic<Name2PairMap> NamedGroupedTimers;