diff options
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Debug.cpp | 11 | ||||
-rw-r--r-- | lib/Support/Timer.cpp | 4 |
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; |