Skip to content

Commit ab2c145

Browse files
authored
[llvm][NFC] A couple cleanups in TrailingObjects (#162521)
1. `verifyTrailingObjectsAlignment` is unused. 2. To spell out the name of a templated base class, we don't need to repeat all of its template arguments.
1 parent 857961d commit ab2c145

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/include/llvm/Support/TrailingObjects.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ class alignas(Align) TrailingObjectsImpl<Align, BaseTy, TopTrailingObj, PrevTy>
182182
static constexpr size_t additionalSizeToAllocImpl(size_t SizeSoFar) {
183183
return SizeSoFar;
184184
}
185-
186-
template <bool CheckAlignment> static void verifyTrailingObjectsAlignment() {}
187185
};
188186

189187
} // end namespace trailing_objects_internal
@@ -203,10 +201,7 @@ class TrailingObjects
203201

204202
template <typename... Tys> class Foo {};
205203

206-
typedef trailing_objects_internal::TrailingObjectsImpl<
207-
trailing_objects_internal::MaxAlignment<TrailingTys...>, BaseTy,
208-
TrailingObjects<BaseTy, TrailingTys...>, BaseTy, TrailingTys...>
209-
ParentType;
204+
using ParentType = typename TrailingObjects::TrailingObjectsImpl;
210205
using TrailingObjectsBase = trailing_objects_internal::TrailingObjectsBase;
211206

212207
using ParentType::getTrailingObjectsImpl;

0 commit comments

Comments
 (0)