Skip to content

Commit f1befb2

Browse files
committed
Add documentation
1 parent 1b719a1 commit f1befb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flang/include/flang/Common/variant.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,17 @@ using cuda::std::variant_size_v;
2424
using cuda::std::visit;
2525
} // namespace std
2626
#else // !RT_USE_LIBCUDACXX
27+
28+
// initializer_list is included to load bits/c++config, which can't be included
29+
// directly and which defines a macro we need to redefine.
2730
#include <initializer_list>
31+
32+
// Redefine problematic abort macro to avoid defining symbols related to
33+
// std::exception. std::exception is defined in the C++ runtime library, which
34+
// we do not want the Fortran runtime library to depend on.
2835
#undef _GLIBCXX_THROW_OR_ABORT
2936
#define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort())
37+
3038
#include <variant>
3139
#endif // !RT_USE_LIBCUDACXX
3240

0 commit comments

Comments
 (0)