[flang-commits] [flang] c2170a3 - [Flang] Allow using common::visit with Clang (#90137)

via flang-commits flang-commits at lists.llvm.org
Thu Apr 25 17:25:45 PDT 2024


Author: Alexander Shaposhnikov
Date: 2024-04-25T17:25:42-07:00
New Revision: c2170a31ed063d4ec6f44a0fb8d124be92911e8b

URL: https://github.com/llvm/llvm-project/commit/c2170a31ed063d4ec6f44a0fb8d124be92911e8b
DIFF: https://github.com/llvm/llvm-project/commit/c2170a31ed063d4ec6f44a0fb8d124be92911e8b.diff

LOG: [Flang] Allow using common::visit with Clang (#90137)

Allow using common::visit with Clang.

Test plan: ninja check-all

Added: 
    

Modified: 
    flang/include/flang/Common/visit.h

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Common/visit.h b/flang/include/flang/Common/visit.h
index d672ed49b93651..d867338be7e0f5 100644
--- a/flang/include/flang/Common/visit.h
+++ b/flang/include/flang/Common/visit.h
@@ -88,7 +88,7 @@ inline RT_API_ATTRS auto visit(VISITOR &&visitor, VARIANT &&...u)
 // Some versions of clang have bugs that cause compilation to hang
 // on these templates.  MSVC and older GCC versions may work but are
 // not well tested.  So enable only for GCC 9 and better.
-#if __GNUC__ < 9
+#if __GNUC__ < 9 && !defined(__clang__)
 #define FLANG_USE_STD_VISIT
 #endif
 


        


More information about the flang-commits mailing list