Skip to content

Commit 0164d54

Browse files
committed
[Support] Add some missing namespace closure comments. NFCI.
Fixes some clang-tidy warnings.
1 parent 7396f72 commit 0164d54

13 files changed

+21
-21
lines changed

llvm/lib/Support/APFloat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3748,7 +3748,7 @@ namespace {
37483748
exp += FirstSignificant;
37493749
buffer.erase(&buffer[0], &buffer[FirstSignificant]);
37503750
}
3751-
}
3751+
} // namespace
37523752

37533753
void IEEEFloat::toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision,
37543754
unsigned FormatMaxPadding, bool TruncateZero) const {
@@ -4777,7 +4777,7 @@ DoubleAPFloat frexp(const DoubleAPFloat &Arg, int &Exp,
47774777
return DoubleAPFloat(semPPCDoubleDouble, std::move(First), std::move(Second));
47784778
}
47794779

4780-
} // End detail namespace
4780+
} // namespace detail
47814781

47824782
APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) {
47834783
if (usesLayout<IEEEFloat>(Semantics)) {

llvm/lib/Support/ARMWinEH.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ std::pair<uint16_t, uint32_t> SavedRegisterMask(const RuntimeFunction &RF) {
3131

3232
return std::make_pair(GPRMask, VFPMask);
3333
}
34-
}
35-
}
36-
}
34+
} // namespace WinEH
35+
} // namespace ARM
36+
} // namespace llvm
3737

llvm/lib/Support/Allocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void printBumpPtrAllocatorStats(unsigned NumSlabs, size_t BytesAllocated,
2626
<< " (includes alignment, etc)\n";
2727
}
2828

29-
} // End namespace detail.
29+
} // namespace detail
3030

3131
void PrintRecyclerStats(size_t Size,
3232
size_t Align,
@@ -36,4 +36,4 @@ void PrintRecyclerStats(size_t Size,
3636
<< "Number of elements free for recycling: " << FreeListSize << '\n';
3737
}
3838

39-
}
39+
} // namespace llvm

llvm/lib/Support/BinaryStreamRef.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class MutableArrayRefImpl : public WritableBinaryStream {
6262
private:
6363
MutableBinaryByteStream BBS;
6464
};
65-
}
65+
} // namespace
6666

6767
BinaryStreamRef::BinaryStreamRef(BinaryStream &Stream)
6868
: BinaryStreamRefBase(Stream) {}

llvm/lib/Support/BuryPointer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ void BuryPointer(const void *Ptr) {
2727
GraveYard[Idx] = Ptr;
2828
}
2929

30-
}
30+
} // namespace llvm

llvm/lib/Support/CrashRecoveryContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct CrashRecoveryContextImpl {
8282
// this occurs when using SEH on Windows with MSVC or clang-cl.
8383
}
8484
};
85-
}
85+
} // namespace
8686

8787
static ManagedStatic<std::mutex> gCrashRecoveryContextMutex;
8888
static bool gCrashRecoveryEnabled = false;
@@ -485,7 +485,7 @@ struct RunSafelyOnThreadInfo {
485485
bool UseBackgroundPriority;
486486
bool Result;
487487
};
488-
}
488+
} // namespace
489489

490490
static void RunSafelyOnThread_Dispatch(void *UserData) {
491491
RunSafelyOnThreadInfo *Info =

llvm/lib/Support/DAGDeltaAlgorithm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class DeltaActiveSetHelper : public DeltaAlgorithm {
174174
: DDAI(DDAI), Required(Required) {}
175175
};
176176

177-
}
177+
} // namespace
178178

179179
DAGDeltaAlgorithmImpl::DAGDeltaAlgorithmImpl(
180180
DAGDeltaAlgorithm &DDA, const changeset_ty &Changes,

llvm/lib/Support/Debug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct DebugOnlyOpt {
109109
}
110110
};
111111

112-
}
112+
} // namespace
113113

114114
static DebugOnlyOpt DebugOnlyOptLoc;
115115

llvm/lib/Support/DynamicLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static llvm::ManagedStatic<llvm::StringMap<void *>> ExplicitSymbols;
116116
static llvm::ManagedStatic<DynamicLibrary::HandleSet> OpenedHandles;
117117
// Lock for ExplicitSymbols and OpenedHandles.
118118
static llvm::ManagedStatic<llvm::sys::SmartMutex<true>> SymbolsMutex;
119-
}
119+
} // namespace
120120

121121
#ifdef _WIN32
122122

@@ -136,7 +136,7 @@ namespace llvm {
136136
void *SearchForAddressOfSpecialSymbol(const char *SymbolName) {
137137
return DoSearch(SymbolName); // DynamicLibrary.inc
138138
}
139-
}
139+
} // namespace llvm
140140

141141
void DynamicLibrary::AddSymbol(StringRef SymbolName, void *SymbolValue) {
142142
SmartScopedLock<true> Lock(*SymbolsMutex);

llvm/lib/Support/ItaniumManglingCanonicalizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ struct CanonicalizerAllocator::MakeNodeImpl<
207207

208208
using CanonicalizingDemangler =
209209
itanium_demangle::ManglingParser<CanonicalizerAllocator>;
210-
}
210+
} // namespace
211211

212212
struct ItaniumManglingCanonicalizer::Impl {
213213
CanonicalizingDemangler Demangler = {nullptr, nullptr};

llvm/lib/Support/MathExtras.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ namespace llvm {
2828
const float huge_valf = HUGE_VALF;
2929
#endif
3030

31-
}
31+
} // namespace llvm

llvm/lib/Support/MemoryBuffer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct NamedBufferAlloc {
6767
const Twine &Name;
6868
NamedBufferAlloc(const Twine &Name) : Name(Name) {}
6969
};
70-
}
70+
} // namespace
7171

7272
void *operator new(size_t N, const NamedBufferAlloc &Alloc) {
7373
SmallString<256> NameBuf;
@@ -101,7 +101,7 @@ class MemoryBufferMem : public MB {
101101
return MemoryBuffer::MemoryBuffer_Malloc;
102102
}
103103
};
104-
}
104+
} // namespace
105105

106106
template <typename MB>
107107
static ErrorOr<std::unique_ptr<MB>>
@@ -219,7 +219,7 @@ class MemoryBufferMMapFile : public MB {
219219
return MemoryBuffer::MemoryBuffer_MMap;
220220
}
221221
};
222-
}
222+
} // namespace
223223

224224
static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
225225
getMemoryBufferForStream(sys::fs::file_t FD, const Twine &BufferName) {

llvm/lib/Support/PrettyStackTrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ PrettyStackTraceEntry *ReverseStackTrace(PrettyStackTraceEntry *Head) {
7373
std::make_tuple(Head, Head->NextEntry, Prev);
7474
return Prev;
7575
}
76-
}
76+
} // namespace llvm
7777

7878
static void PrintStack(raw_ostream &OS) {
7979
// Print out the stack in reverse order. To avoid recursion (which is likely

0 commit comments

Comments
 (0)