[flang] Tweak the conditions for the GCC 7/libstdc++ workaround
authorMartin Storsjö <martin@martin.st>
Wed, 23 Jun 2021 11:37:01 +0000 (14:37 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 23 Jun 2021 20:19:32 +0000 (23:19 +0300)
commit2716c6faa46f346b66fe7af5219d611b369d42e9
tree365b79bad29f19fd321995b7fa9dc37afc0f047b
parent84046ebd9543d60832d9a580bcbe2e3e5acc3217
[flang] Tweak the conditions for the GCC 7/libstdc++ workaround

This adjusts the workaround from D104731.

The issue lies in libstdc++'s classes, not GCC itself, and manifests
itself in the same way if building e.g. with clang while using
libstdc++ headers from GCC 7 (e.g. if building with Clang on Ubuntu 18.04,
while using the system default C++ library).

Therefore, change the condition to look for the version of libstdc++
instead of the compiler.

Differential Revision: https://reviews.llvm.org/D104779
flang/include/flang/Evaluate/type.h