[flang-commits] [flang] [Flang] Implement RENAME intrinsic (code-gen + runtime entry point) (PR #98359)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Thu Jul 11 05:55:19 PDT 2024


================
@@ -67,7 +68,13 @@ void RTDECL(Rename)(const Descriptor &path1, const Descriptor &path2,
   // We simply call rename(2) from POSIX
   int result = rename(pathSrc, pathDst);
   if (status) {
-    StoreIntToDescriptor(status, result, terminator);
+    // When an error has happened,
+    int errorCode = 0; // Assume success
+    if (result < 0) {
----------------
tblah wrote:

nit: The Windows documentation just says "a non-zero value"
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/rename-wrename

https://github.com/llvm/llvm-project/pull/98359


More information about the flang-commits mailing list