[flang] Add AsFortran() for types
authorTim Keith <tkeith@nvidia.com>
Sat, 22 Jun 2019 17:16:13 +0000 (10:16 -0700)
committerTim Keith <tkeith@nvidia.com>
Sun, 23 Jun 2019 01:14:14 +0000 (18:14 -0700)
commit9a98616dbb0ff24984a022da7c84c4019e41066e
treec1be51c6301d3bddbae87cdee34532588b2600d1
parent377914d8b3116f6af122b9d8fc04f24247b0ac11
[flang] Add AsFortran() for types

Add an `AsFortran()` member function to `DeclTypeSpec` and related
classes to convert types to a Fortran representation. This allows
error messages to mention types. It also fixes `.mod` file writing
where it previous used `operator<<` to convert types to Fortran.

Original-commit: flang-compiler/f18@eb16f8b5dd1b8c3631690afce03c3b26b26d0f6f
Reviewed-on: https://github.com/flang-compiler/f18/pull/521
Tree-same-pre-rewrite: false
flang/lib/semantics/mod-file.cc
flang/lib/semantics/type.cc
flang/lib/semantics/type.h