Guard a feature that unsupported by old GCC

Summary:
As @david2050 commented, changes introduced by https://reviews.llvm.org/D56397 break builds for older compilers
which don't support `__has(_cpp)_attribute`. This is a fix for the break.

Reviewers: protze.joachim, jlpeyton, AndreyChurbanov, Hahnfeld, david2050

Subscribers: openmp-commits, david2050

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D57851

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@353538 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed