[all-commits] [llvm/llvm-project] 889c7c: [flang] Support correct continuations for compiler...

Daniil Dudkin via All-commits all-commits at lists.llvm.org
Fri May 27 03:47:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 889c7c8e9260932dce5367df3f7ed7ecc32dbe8e
      https://github.com/llvm/llvm-project/commit/889c7c8e9260932dce5367df3f7ed7ecc32dbe8e
  Author: Daniil Dudkin <d.dudkin at partner.samsung.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M flang/lib/Parser/parsing.cpp
    A flang/test/Preprocessing/pp132.f90
    A flang/test/Preprocessing/pp133.f90

  Log Message:
  -----------
  [flang] Support correct continuations for compiler directives

If a line is over 72 characters long, flang's preprocessor cuts it there
and continues on the next line.
For this purpose it uses the standard way of continuing line with & on each line.
However, it doesn't work with long compiler directives, like OpenMP or OpenACC ones.
The line that continues the directive also has to
contain the corresponding sentinel at the beginning.

This change implements the described functionality.
Also, some code was refactored in order to simplify and reuse existing code.

Reviewed By: klausler

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




More information about the All-commits mailing list