[Openmp-commits] [PATCH] D109469: [OpenMP] Fix line truncation in omp_lib.h
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Sep 9 05:18:54 PDT 2021
AndreyChurbanov requested changes to this revision.
AndreyChurbanov added inline comments.
This revision now requires changes to proceed.
================
Comment at: openmp/runtime/src/include/omp_lib.h.var:222
! Preview of target memory support
- integer(kind=omp_allocator_handle_kind)llvm_omp_target_host_mem_alloc
+ integer(kind=omp_allocator_handle_kind) &
+ & llvm_omp_target_host_mem_alloc
----------------
I think a better way to reduce the line length is to remove optional "kind=" from the attribute. E.g.
```
integer(omp_allocator_handle_kind)llvm_omp_target_device_mem_alloc
```
will fit into 72 char length.
In general there is no reliable way to have line continuation suitable for both fixed and free source forms,
because compilers usually have an option to change default line length, possibly up to "infinite" (e.g. -ffixed-line-length-0 for gfortran).
So having & at the end of line and beginning of the next line can always fail to compile with some compiler options.
Better to avoid this "universal" continuation if possible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109469/new/
https://reviews.llvm.org/D109469
More information about the Openmp-commits
mailing list