[all-commits] [llvm/llvm-project] abbb0f: [flang] Change complex type define in runtime for ...

Diana via All-commits all-commits at lists.llvm.org
Tue Sep 21 23:55:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: abbb0f901ad85aaa06780deefbda9c0ee0c2c7a2
      https://github.com/llvm/llvm-project/commit/abbb0f901ad85aaa06780deefbda9c0ee0c2c7a2
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M flang/runtime/complex-reduction.c
    M flang/runtime/complex-reduction.h

  Log Message:
  -----------
  [flang] Change complex type define in runtime for clang-cl

When compiling the runtime with a version of clang-cl newer than 12, we
define CMPLXF as __builtin_complex, which returns a float _Complex type.
This errors out in contexts where the result of CMPLXF is expected to be
a float_Complex_t. This is defined as _Fcomplex whenever _MSC_VER is
defined (and as float _Complex otherwise).

This patch defines float_Complex_t & friends as _Fcomplex only when
we're using "true" MSVC, and not just clang-pretending-to-be-MSVC. This
should only affect clang-cl >= 12.

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




More information about the All-commits mailing list