[flang-commits] [clang-tools-extra] [clang] [flang] [llvm] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Jan 26 09:09:09 PST 2024
================
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType,
resultType, args);
}
+// SYSTEM
+void IntrinsicLibrary::genSystem(llvm::ArrayRef<fir::ExtendedValue> args) {
+ assert(args.size() == 2);
+ mlir::Value command = fir::getBase(args[0]);
+ const fir::ExtendedValue &exitstat = args[1];
+
+ if (!command)
+ fir::emitFatalError(loc, "expected COMMAND parameter");
----------------
tblah wrote:
nit: this can be an assertion because the presence or absence of arguments should have already been checked against the specification in `flang/lib/Evaluate/intrinsics.cpp`
https://github.com/llvm/llvm-project/pull/74309
More information about the flang-commits
mailing list