From a5b6aef24e7a3f2a74cc4e716314d3f8d424d1c1 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sun, 23 Jan 2022 14:08:06 -0600 Subject: [PATCH] [Attributor][NFCI] Remove anonymous namespaces The namespaces made it more complicate to implement static helpers, among other things. We should not need them at all. --- llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index 7642078..ea3f449 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -1026,7 +1026,6 @@ private: BooleanState BS; }; -namespace { struct AAPointerInfoImpl : public StateWrapper { using BaseTy = StateWrapper; @@ -5085,7 +5084,6 @@ struct AANoCaptureCallSiteReturned final : AANoCaptureImpl { STATS_DECLTRACK_CSRET_ATTR(nocapture) } }; -} // namespace /// ------------------ Value Simplify Attribute ---------------------------- @@ -5106,7 +5104,6 @@ bool ValueSimplifyStateType::unionAssumed(Optional Other) { return true; } -namespace { struct AAValueSimplifyImpl : AAValueSimplify { AAValueSimplifyImpl(const IRPosition &IRP, Attributor &A) : AAValueSimplify(IRP, A) {} @@ -7378,7 +7375,6 @@ void AAMemoryBehaviorFloating::analyzeUseIn(Attributor &A, const Use &U, if (UserI->mayWriteToMemory()) removeAssumedBits(NO_WRITES); } -} // namespace /// -------------------- Memory Locations Attributes --------------------------- /// Includes read-none, argmemonly, inaccessiblememonly, @@ -7412,7 +7408,6 @@ std::string AAMemoryLocation::getMemoryLocationsAsStr( return S; } -namespace { struct AAMemoryLocationImpl : public AAMemoryLocation { AAMemoryLocationImpl(const IRPosition &IRP, Attributor &A) @@ -9790,8 +9785,6 @@ private: } }; -} // namespace - AACallGraphNode *AACallEdgeIterator::operator*() const { return static_cast(const_cast( &A.getOrCreateAAFor(IRPosition::function(**I)))); -- 2.7.4