[PATCH] D84059: Insert leading blanks in LOGICAL formatted output fields

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 10:45:07 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe79a86e45b21: [flang] Insert leading blanks in LOGICAL formatted output fields (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84059/new/

https://reviews.llvm.org/D84059

Files:
  flang/runtime/edit-output.cpp


Index: flang/runtime/edit-output.cpp
===================================================================
--- flang/runtime/edit-output.cpp
+++ flang/runtime/edit-output.cpp
@@ -424,7 +424,8 @@
   switch (edit.descriptor) {
   case 'L':
   case 'G':
-    return io.Emit(truth ? "T" : "F", 1);
+    return io.EmitRepeated(' ', std::max(0, edit.width.value_or(1) - 1)) &&
+        io.Emit(truth ? "T" : "F", 1);
   default:
     io.GetIoErrorHandler().SignalError(IostatErrorInFormat,
         "Data edit descriptor '%c' may not be used with a LOGICAL data item",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84059.279014.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200718/4f1bfd83/attachment.bin>


More information about the llvm-commits mailing list