[flang-commits] [flang] [flang] Add GETCWD runtime and lowering intrinsics implementation (PR #92746)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon May 20 08:13:53 PDT 2024
================
@@ -3465,6 +3469,37 @@ mlir::Value IntrinsicLibrary::genFraction(mlir::Type resultType,
fir::runtime::genFraction(builder, loc, fir::getBase(args[0])));
}
+// GETCWD
+fir::ExtendedValue
+IntrinsicLibrary::genGetCwd(std::optional<mlir::Type> resultType,
+ llvm::ArrayRef<fir::ExtendedValue> args) {
+ assert((args.size() == 1 && resultType.has_value()) ||
+ (args.size() >= 1 && !resultType.has_value()));
+
+ auto cwd = fir::getBase(args[0]);
+ auto statusValue = fir::runtime::genGetCwd(builder, loc, cwd);
----------------
tblah wrote:
nit: please spell out `auto` here
https://github.com/llvm/llvm-project/pull/92746
More information about the flang-commits
mailing list