[flang-commits] [flang] d0e03bf - [flang] Add a placeholder argument for a format descriptor on IO calls
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Fri Aug 19 13:39:33 PDT 2022
Author: Peter Klausler
Date: 2022-08-19T13:39:17-07:00
New Revision: d0e03bf06b2a7c05d8c478845282a68cba7cdda2
URL: https://github.com/llvm/llvm-project/commit/d0e03bf06b2a7c05d8c478845282a68cba7cdda2
DIFF: https://github.com/llvm/llvm-project/commit/d0e03bf06b2a7c05d8c478845282a68cba7cdda2.diff
LOG: [flang] Add a placeholder argument for a format descriptor on IO calls
Author: vdonaldson
Differential Revision: https://reviews.llvm.org/D132259
Added:
Modified:
flang/lib/Lower/IO.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/IO.cpp b/flang/lib/Lower/IO.cpp
index 6545d20b6e28e..b7fc7c4d1033e 100644
--- a/flang/lib/Lower/IO.cpp
+++ b/flang/lib/Lower/IO.cpp
@@ -1894,11 +1894,15 @@ void genBeginDataTransferCallArgs(
loc, builder.getIntegerAttr(ioFuncTy.getInput(ioArgs.size()),
Fortran::runtime::io::DefaultUnit)));
}
- // File name and line number are always the last two arguments.
+ // File name and line number.
ioArgs.push_back(
locToFilename(converter, loc, ioFuncTy.getInput(ioArgs.size())));
ioArgs.push_back(
locToLineNo(converter, loc, ioFuncTy.getInput(ioArgs.size())));
+ // Placeholder for format passed as a descriptor.
+ if (isFormatted && !isListOrNml)
+ ioArgs.push_back(
+ builder.createNullConstant(loc, ioFuncTy.getInput(ioArgs.size())));
}
template <bool isInput, bool hasIOCtrl = true, typename A>
More information about the flang-commits
mailing list