[llvm] 0164d54 - [Support] Add some missing namespace closure comments. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 03:25:57 PST 2021
Author: Simon Pilgrim
Date: 2021-01-28T11:21:35Z
New Revision: 0164d546d2691c439fc06c8fff126224276c2d02
URL: https://github.com/llvm/llvm-project/commit/0164d546d2691c439fc06c8fff126224276c2d02
DIFF: https://github.com/llvm/llvm-project/commit/0164d546d2691c439fc06c8fff126224276c2d02.diff
LOG: [Support] Add some missing namespace closure comments. NFCI.
Fixes some clang-tidy warnings.
Added:
Modified:
llvm/lib/Support/APFloat.cpp
llvm/lib/Support/ARMWinEH.cpp
llvm/lib/Support/Allocator.cpp
llvm/lib/Support/BinaryStreamRef.cpp
llvm/lib/Support/BuryPointer.cpp
llvm/lib/Support/CrashRecoveryContext.cpp
llvm/lib/Support/DAGDeltaAlgorithm.cpp
llvm/lib/Support/Debug.cpp
llvm/lib/Support/DynamicLibrary.cpp
llvm/lib/Support/ItaniumManglingCanonicalizer.cpp
llvm/lib/Support/MathExtras.cpp
llvm/lib/Support/MemoryBuffer.cpp
llvm/lib/Support/PrettyStackTrace.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 5dea98ee3993..b22b1540169d 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -3748,7 +3748,7 @@ namespace {
exp += FirstSignificant;
buffer.erase(&buffer[0], &buffer[FirstSignificant]);
}
-}
+} // namespace
void IEEEFloat::toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision,
unsigned FormatMaxPadding, bool TruncateZero) const {
@@ -4777,7 +4777,7 @@ DoubleAPFloat frexp(const DoubleAPFloat &Arg, int &Exp,
return DoubleAPFloat(semPPCDoubleDouble, std::move(First), std::move(Second));
}
-} // End detail namespace
+} // namespace detail
APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) {
if (usesLayout<IEEEFloat>(Semantics)) {
diff --git a/llvm/lib/Support/ARMWinEH.cpp b/llvm/lib/Support/ARMWinEH.cpp
index 831f95cd4b0b..2e2fcf28451f 100644
--- a/llvm/lib/Support/ARMWinEH.cpp
+++ b/llvm/lib/Support/ARMWinEH.cpp
@@ -31,7 +31,7 @@ std::pair<uint16_t, uint32_t> SavedRegisterMask(const RuntimeFunction &RF) {
return std::make_pair(GPRMask, VFPMask);
}
-}
-}
-}
+} // namespace WinEH
+} // namespace ARM
+} // namespace llvm
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp
index 718d3fc0d8e1..1af5744bf301 100644
--- a/llvm/lib/Support/Allocator.cpp
+++ b/llvm/lib/Support/Allocator.cpp
@@ -26,7 +26,7 @@ void printBumpPtrAllocatorStats(unsigned NumSlabs, size_t BytesAllocated,
<< " (includes alignment, etc)\n";
}
-} // End namespace detail.
+} // namespace detail
void PrintRecyclerStats(size_t Size,
size_t Align,
@@ -36,4 +36,4 @@ void PrintRecyclerStats(size_t Size,
<< "Number of elements free for recycling: " << FreeListSize << '\n';
}
-}
+} // namespace llvm
diff --git a/llvm/lib/Support/BinaryStreamRef.cpp b/llvm/lib/Support/BinaryStreamRef.cpp
index 6bcc504ffad5..53e71baad57a 100644
--- a/llvm/lib/Support/BinaryStreamRef.cpp
+++ b/llvm/lib/Support/BinaryStreamRef.cpp
@@ -62,7 +62,7 @@ class MutableArrayRefImpl : public WritableBinaryStream {
private:
MutableBinaryByteStream BBS;
};
-}
+} // namespace
BinaryStreamRef::BinaryStreamRef(BinaryStream &Stream)
: BinaryStreamRefBase(Stream) {}
diff --git a/llvm/lib/Support/BuryPointer.cpp b/llvm/lib/Support/BuryPointer.cpp
index 435f89010d41..536aee7665d4 100644
--- a/llvm/lib/Support/BuryPointer.cpp
+++ b/llvm/lib/Support/BuryPointer.cpp
@@ -27,4 +27,4 @@ void BuryPointer(const void *Ptr) {
GraveYard[Idx] = Ptr;
}
-}
+} // namespace llvm
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp
index 3d3ca7f567c7..3ee6a4fd36f4 100644
--- a/llvm/lib/Support/CrashRecoveryContext.cpp
+++ b/llvm/lib/Support/CrashRecoveryContext.cpp
@@ -82,7 +82,7 @@ struct CrashRecoveryContextImpl {
// this occurs when using SEH on Windows with MSVC or clang-cl.
}
};
-}
+} // namespace
static ManagedStatic<std::mutex> gCrashRecoveryContextMutex;
static bool gCrashRecoveryEnabled = false;
@@ -485,7 +485,7 @@ struct RunSafelyOnThreadInfo {
bool UseBackgroundPriority;
bool Result;
};
-}
+} // namespace
static void RunSafelyOnThread_Dispatch(void *UserData) {
RunSafelyOnThreadInfo *Info =
diff --git a/llvm/lib/Support/DAGDeltaAlgorithm.cpp b/llvm/lib/Support/DAGDeltaAlgorithm.cpp
index 4675fe3a9401..e5e6301d41cc 100644
--- a/llvm/lib/Support/DAGDeltaAlgorithm.cpp
+++ b/llvm/lib/Support/DAGDeltaAlgorithm.cpp
@@ -174,7 +174,7 @@ class DeltaActiveSetHelper : public DeltaAlgorithm {
: DDAI(DDAI), Required(Required) {}
};
-}
+} // namespace
DAGDeltaAlgorithmImpl::DAGDeltaAlgorithmImpl(
DAGDeltaAlgorithm &DDA, const changeset_ty &Changes,
diff --git a/llvm/lib/Support/Debug.cpp b/llvm/lib/Support/Debug.cpp
index 73b25d55237b..19b40abdf079 100644
--- a/llvm/lib/Support/Debug.cpp
+++ b/llvm/lib/Support/Debug.cpp
@@ -109,7 +109,7 @@ struct DebugOnlyOpt {
}
};
-}
+} // namespace
static DebugOnlyOpt DebugOnlyOptLoc;
diff --git a/llvm/lib/Support/DynamicLibrary.cpp b/llvm/lib/Support/DynamicLibrary.cpp
index bdf74623670b..2bcdbdcdb9b0 100644
--- a/llvm/lib/Support/DynamicLibrary.cpp
+++ b/llvm/lib/Support/DynamicLibrary.cpp
@@ -116,7 +116,7 @@ static llvm::ManagedStatic<llvm::StringMap<void *>> ExplicitSymbols;
static llvm::ManagedStatic<DynamicLibrary::HandleSet> OpenedHandles;
// Lock for ExplicitSymbols and OpenedHandles.
static llvm::ManagedStatic<llvm::sys::SmartMutex<true>> SymbolsMutex;
-}
+} // namespace
#ifdef _WIN32
@@ -136,7 +136,7 @@ namespace llvm {
void *SearchForAddressOfSpecialSymbol(const char *SymbolName) {
return DoSearch(SymbolName); // DynamicLibrary.inc
}
-}
+} // namespace llvm
void DynamicLibrary::AddSymbol(StringRef SymbolName, void *SymbolValue) {
SmartScopedLock<true> Lock(*SymbolsMutex);
diff --git a/llvm/lib/Support/ItaniumManglingCanonicalizer.cpp b/llvm/lib/Support/ItaniumManglingCanonicalizer.cpp
index 9d3cf61459dd..e6cba26cfcf3 100644
--- a/llvm/lib/Support/ItaniumManglingCanonicalizer.cpp
+++ b/llvm/lib/Support/ItaniumManglingCanonicalizer.cpp
@@ -207,7 +207,7 @@ struct CanonicalizerAllocator::MakeNodeImpl<
using CanonicalizingDemangler =
itanium_demangle::ManglingParser<CanonicalizerAllocator>;
-}
+} // namespace
struct ItaniumManglingCanonicalizer::Impl {
CanonicalizingDemangler Demangler = {nullptr, nullptr};
diff --git a/llvm/lib/Support/MathExtras.cpp b/llvm/lib/Support/MathExtras.cpp
index 87c7101c424b..7efffaa7f8b8 100644
--- a/llvm/lib/Support/MathExtras.cpp
+++ b/llvm/lib/Support/MathExtras.cpp
@@ -28,4 +28,4 @@ namespace llvm {
const float huge_valf = HUGE_VALF;
#endif
-}
+} // namespace llvm
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp
index 248fb72c4968..a05b7d8ddd0e 100644
--- a/llvm/lib/Support/MemoryBuffer.cpp
+++ b/llvm/lib/Support/MemoryBuffer.cpp
@@ -67,7 +67,7 @@ struct NamedBufferAlloc {
const Twine &Name;
NamedBufferAlloc(const Twine &Name) : Name(Name) {}
};
-}
+} // namespace
void *operator new(size_t N, const NamedBufferAlloc &Alloc) {
SmallString<256> NameBuf;
@@ -101,7 +101,7 @@ class MemoryBufferMem : public MB {
return MemoryBuffer::MemoryBuffer_Malloc;
}
};
-}
+} // namespace
template <typename MB>
static ErrorOr<std::unique_ptr<MB>>
@@ -219,7 +219,7 @@ class MemoryBufferMMapFile : public MB {
return MemoryBuffer::MemoryBuffer_MMap;
}
};
-}
+} // namespace
static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
getMemoryBufferForStream(sys::fs::file_t FD, const Twine &BufferName) {
diff --git a/llvm/lib/Support/PrettyStackTrace.cpp b/llvm/lib/Support/PrettyStackTrace.cpp
index 5d3d95b5e7cb..0d07057f1df0 100644
--- a/llvm/lib/Support/PrettyStackTrace.cpp
+++ b/llvm/lib/Support/PrettyStackTrace.cpp
@@ -73,7 +73,7 @@ PrettyStackTraceEntry *ReverseStackTrace(PrettyStackTraceEntry *Head) {
std::make_tuple(Head, Head->NextEntry, Prev);
return Prev;
}
-}
+} // namespace llvm
static void PrintStack(raw_ostream &OS) {
// Print out the stack in reverse order. To avoid recursion (which is likely
More information about the llvm-commits
mailing list