Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

[swift-4.0-branch] Add workaround for MSVC bug #42

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/llvm/Support/TrailingObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ class TrailingObjectsImpl<Align, BaseTy, TopTrailingObj, PrevTy>
/// See the file comment for details on the usage of the
/// TrailingObjects type.
template <typename BaseTy, typename... TrailingTys>

// Work around MSVC build error: cannot access inaccessible struct declared
// in class'llvm::trailing_objects_internal::TrailingObjectsBase'
#if defined(_MSC_VER)
class TrailingObjects : protected trailing_objects_internal::TrailingObjectsImpl<
#else
class TrailingObjects : private trailing_objects_internal::TrailingObjectsImpl<
#endif
trailing_objects_internal::AlignmentCalcHelper<
TrailingTys...>::Alignment,
BaseTy, TrailingObjects<BaseTy, TrailingTys...>,
Expand Down