[flang] Outline operator<< for CharBlock. (flang-compiler/f18#916)
authorDavid Truby <david.truby@arm.com>
Tue, 14 Jan 2020 06:08:56 +0000 (06:08 +0000)
committerSteve Scalpone <sscalpone@nvidia.com>
Tue, 14 Jan 2020 06:08:56 +0000 (22:08 -0800)
commit05bdb54a490a3a88d3ca90e8ba8e67492c2f6648
treef19bf3d496726254bc4342992b7e878bb558d945
parentd731aeffacebc37aa5b50743e1ae0eaee8492704
[flang] Outline operator<< for CharBlock. (flang-compiler/f18#916)

This fixes an issue where the Dump function definitions in dump.cc
were relying on the forward declaration of operator<< for CharBlock
which was marked inline and only present in char-block.h.

This is not allowed under section 6.2.10 of the C++17 standard, and
caused a compilation failure when building with clang 9 as this was
inlining every use of the function and therefore not generating an
outlined definition for linking.

Original-commit: flang-compiler/f18@3ad75d123b666a5081540f2afedbedde930b2518
Reviewed-on: https://github.com/flang-compiler/f18/pull/916
flang/lib/parser/CMakeLists.txt
flang/lib/parser/char-block.cc [new file with mode: 0644]
flang/lib/parser/char-block.h