Skip to content

Commit 6c22816

Browse files
committed
Revert changes to variant.h
1 parent 20cbc52 commit 6c22816

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

flang/include/flang/Common/variant.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,6 @@ 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.
30-
#include <initializer_list>
31-
32-
// The macro _GLIBCXX_THROW_OR_ABORT is used by libstdc++ to not throw
33-
// exceptions in -fno-exceptions mode, but immediatly kill the program. Since
34-
// libstdc++ 15.1 the macro uses (void)(_EXC) after calling abort() to silence
35-
// compiler warnings of an parameter. In its use in <variant>, _EXC is the
36-
// construction of `std::bad_variant_access`. In non-optimized builds, some
37-
// compilers including Clang will emit a call to that constructor. The
38-
// constructor is implemented in libstdc++.a/.so which Flang-RT must not depend
39-
// on (to avoid compatibility problems if a Fortran application itself has parts
40-
// implemented in C++). Note that _GLIBCXX_THROW_OR_ABORT is not on the list of
41-
// libstdc++'s documented user-configurable macros.
42-
#undef _GLIBCXX_THROW_OR_ABORT
43-
#define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort())
44-
4527
#include <variant>
4628
#endif // !RT_USE_LIBCUDACXX
4729

0 commit comments

Comments
 (0)