[flang-commits] [flang] [flang] Add GETCWD runtime and lowering intrinsics implementation (PR #92746)
Michael Klemm via flang-commits
flang-commits at lists.llvm.org
Mon May 20 09:48:08 PDT 2024
================
@@ -239,4 +241,22 @@ std::int32_t RTNAME(GetEnvVariable)(const Descriptor &name,
return StatOk;
}
+std::int32_t RTNAME(GetCwd)(
+ const Descriptor &cwd, const char *sourceFile, int line) {
+ Terminator terminator{sourceFile, line};
+
+ RUNTIME_CHECK(terminator, IsValidCharDescriptor(&cwd));
+
+ char *buf = getcwd(nullptr, 0);
----------------
mjklemm wrote:
In the least, this assumption should be documented as a comment.
https://github.com/llvm/llvm-project/pull/92746
More information about the flang-commits
mailing list