[flang-commits] [PATCH] D110139: [flang] Change complex type define in runtime for clang-cl

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Sep 21 23:55:27 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGabbb0f901ad8: [flang] Change complex type define in runtime for clang-cl (authored by rovka).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110139/new/

https://reviews.llvm.org/D110139

Files:
  flang/runtime/complex-reduction.c
  flang/runtime/complex-reduction.h


Index: flang/runtime/complex-reduction.h
===================================================================
--- flang/runtime/complex-reduction.h
+++ flang/runtime/complex-reduction.h
@@ -20,7 +20,7 @@
 
 struct CppDescriptor; /* dummy type name for Fortran::runtime::Descriptor */
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && !(defined(__clang_major__) && __clang_major__ >= 12)
 typedef _Fcomplex float_Complex_t;
 typedef _Dcomplex double_Complex_t;
 typedef _Lcomplex long_double_Complex_t;
Index: flang/runtime/complex-reduction.c
===================================================================
--- flang/runtime/complex-reduction.c
+++ flang/runtime/complex-reduction.c
@@ -23,7 +23,7 @@
 /* Not all environments define CMPLXF, CMPLX, CMPLXL. */
 
 #ifndef CMPLXF
-#if __clang_major__ >= 12
+#if defined(__clang_major__) && (__clang_major__ >= 12)
 #define CMPLXF __builtin_complex
 #else
 static float_Complex_t CMPLXF(float r, float i) {
@@ -39,7 +39,7 @@
 #endif
 
 #ifndef CMPLX
-#if __clang_major__ >= 12
+#if defined(__clang_major__) && (__clang_major__ >= 12)
 #define CMPLX __builtin_complex
 #else
 static double_Complex_t CMPLX(double r, double i) {
@@ -55,7 +55,7 @@
 #endif
 
 #ifndef CMPLXL
-#if __clang_major__ >= 12
+#if defined(__clang_major__) && (__clang_major__ >= 12)
 #define CMPLXL __builtin_complex
 #else
 static long_double_Complex_t CMPLXL(long double r, long double i) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110139.374128.patch
Type: text/x-patch
Size: 1409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210922/fa91e474/attachment.bin>


More information about the flang-commits mailing list