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

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Mon Jul 15 09:51:49 PDT 2024


================
@@ -55,6 +56,36 @@ static RT_API_ATTRS void TransferImpl(Descriptor &result,
 extern "C" {
 RT_EXT_API_GROUP_BEGIN
 
+void RTDECL(Rename)(const Descriptor &path1, const Descriptor &path2,
----------------
vzakhari wrote:

`RTDECL` -> `RTDEF`

I suggest using `#if !defined(RT_DEVICE_COMPILATION)` to guard the body of the function, as long as the device runtimes do not provide POSIX `rename`.  I would also suggest issuing an `unsupported` crash message in the else clause of the check.

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


More information about the flang-commits mailing list