Skip to content

Commit

Permalink
Workaround nvc++ bug
Browse files Browse the repository at this point in the history
The previous code causes a linker failure due to a duplicated definition of `PointerLikeTypeTraits<decltype(PointerUnion<PTs...>::Val)>::NumLowBitsAvailable`.
  • Loading branch information
bernhardmgruber committed Nov 29, 2023
1 parent 924306c commit 8c0a2d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions interpreter/llvm-project/llvm/include/llvm/ADT/PointerUnion.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,9 @@ struct PointerLikeTypeTraits<PointerUnion<PTs...>> {

// The number of bits available are the min of the pointer types minus the
// bits needed for the discriminator.
static constexpr int NumLowBitsAvailable = PointerLikeTypeTraits<decltype(
PointerUnion<PTs...>::Val)>::NumLowBitsAvailable;
using nvhpcWorkAround = decltype(PointerUnion<PTs...>::Val);
static constexpr int NumLowBitsAvailable =
PointerLikeTypeTraits<nvhpcWorkAround>::NumLowBitsAvailable;
};

// Teach DenseMap how to use PointerUnions as keys.
Expand Down

0 comments on commit 8c0a2d2

Please sign in to comment.