Page MenuHomePhabricator

[flang] add RTBuilder
ClosedPublic

Authored by schweitz on Jun 23 2020, 8:26 AM.

Details

Summary
[flang] add RTBuilder.h

This is a set of type building models that is specific to the lowering
process. It provides the mechanism of mapping C(++) header file interfaces
to the MLIR+FIR type system.

It also provides some macros to build a constexpr evaluated table to
runtime functions. This code is used to build the interface tables to
various runtime support libraries.

Diff Detail

Event Timeline

schweitz created this revision.Jun 23 2020, 8:26 AM
jeanPerier accepted this revision.Jun 23 2020, 9:34 AM
This revision is now accepted and ready to land.Jun 23 2020, 9:34 AM
This revision was automatically updated to reflect the committed changes.

This causes warnings about -Wc99-extensions due to the use of _Complex.

DavidTruby added a comment.EditedJul 6 2020, 6:49 AM

Is there a reason to use float _Complex here at all? The C++ standard (29.5.4 of C++17) guarantees that std::complex<float> and float _Complex are layout compatible and can be reinterpret_casted to each other so even if these functions are intended to be callable from C/interoperable with _Complex in C code, it'd be better to use std::complex<float> on the C++ side.