[clang] [clang-tools-extra] [flang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-13 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/4] GETLOG runtime and extension implementation: get login username Ge

[llvm] [flang] [clang] [clang-tools-extra] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-13 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/4] FDATE extension implementation: get date and time in ctime format

[llvm] [clang] [clang-tools-extra] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-13 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/5] GETLOG runtime and extension implementation: get login username Ge

[clang] [flang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-13 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/5] GETLOG runtime and extension implementation: get login username Ge

[flang] [clang-tools-extra] [clang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; yi-wu-arm wr

[flang] [llvm] [clang-tools-extra] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -39,6 +39,17 @@ // overload will have a dummy parameter whose type indicates whether or not it // should be preferred. Any other parameters required for SFINAE should have // default values provided. + +// outside anonymous namespace, function reused yi-wu-a

[flang] [llvm] [clang-tools-extra] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -751,7 +751,7 @@ This phase currently supports all the intrinsic procedures listed above but the | Object characteristic inquiry functions | ALLOCATED, ASSOCIATED, EXTENDS_TYPE_OF, IS_CONTIGUOUS, PRESENT, RANK, SAME_TYPE, STORAGE_SIZE | | Type inquiry intrinsic functions |

[llvm] [clang-tools-extra] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/15] GETLOG runtime and extension implementation: get login username

[flang] [llvm] [clang-tools-extra] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/16] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [clang] [flang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/17] GETLOG runtime and extension implementation: get login username

[clang] [clang-tools-extra] [flang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-06 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: CI didn't pass because `getlogin_r` fail on Linux with error code 6. ``` ENXIO The calling process has no controlling terminal. ``` https://man.archlinux.org/man/getlogin_r.3.en#EMFILE suggested using environment variable rather than use `getlogin` or `getlogin_r`. Thus, the imp

[flang] [clang-tools-extra] [llvm] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm created https://github.com/llvm/llvm-project/pull/74628 Get login username, ussage: ``` CHARACTER(32) :: login CALL getlog(login) WRITE(*,*) login ``` getlog is required for an exascale proxyapp. https://proxyapps.exascaleproject.org/app/minismac2d/ https://github.co

[flang] [clang-tools-extra] [llvm] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: accidently push the wrong branch in previous pr https://github.com/llvm/llvm-project/pull/70917 https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[flang] [clang-tools-extra] [llvm] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: https://github.com/llvm/llvm-project/pull/70917#issuecomment-1843314222 https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [llvm] [clang] [clang-tools-extra] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm closed https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm reopened https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang] [clang-tools-extra] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/21] GETLOG runtime and extension implementation: get login username

[clang] [llvm] [flang] [clang-tools-extra] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm ready_for_review https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -10,10 +10,52 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "terminator.h" +#include "flang/Runtime/character.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Ru

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -37,5 +79,34 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +// CALL GETLOG(USRNAME) +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + const int nameMaxLen

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/22] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -10,10 +10,52 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "terminator.h" +#include "flang/Runtime/character.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Ru

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -657,6 +657,11 @@ CALL CO_REDUCE CALL CO_SUM ``` +### Library subroutine yi-wu-arm wrote: I have moved it to the end of `intrinsic` block. https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing

[clang-tools-extra] [llvm] [clang] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -37,5 +79,34 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +// CALL GETLOG(USRNAME) +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + const int nameMaxLen

[clang] [clang-tools-extra] [flang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/23] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-06 Thread Yi Wu via cfe-commits
@@ -37,5 +79,34 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +// CALL GETLOG(USRNAME) +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + const int nameMaxLen

[clang] [flang] [llvm] [clang-tools-extra] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-07 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/23] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [clang] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-07 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/23] GETLOG runtime and extension implementation: get login username

[flang] [clang-tools-extra] [clang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-07 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: `getlog` library intrinsic will first retrieve user login name using `getlog_r` on Linux and `GetUserName` on Windows. If that returns an error, it will then use environment variable to get username. https://github.com/llvm/llvm-project/pull/74628 _

[libc] [clang-tools-extra] [flang] [libcxx] [llvm] [clang] [lldb] [compiler-rt] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-07 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/10] FDATE extension implementation: get date and time in ctime format

[compiler-rt] [lldb] [libcxx] [clang-tools-extra] [clang] [flang] [llvm] [libc] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-07 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/11] FDATE extension implementation: get date and time in ctime format

[llvm] [flang] [clang-tools-extra] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/25] GETLOG runtime and extension implementation: get login username

[llvm] [flang] [clang-tools-extra] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Yi Wu via cfe-commits
@@ -10,10 +10,50 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "flang/Runtime/character.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#ifdef

[clang] [clang-tools-extra] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Yi Wu via cfe-commits
@@ -6,6 +6,37 @@ // //===--===// +// character.h yi-wu-arm wrote: It actually meant to match the `CHARCHTER_H` in the end of `#endif`, but I guess that create a confusion and should be remo

[flang] [clang] [clang-tools-extra] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/26] GETLOG runtime and extension implementation: get login username

[llvm] [flang] [clang-tools-extra] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Yi Wu via cfe-commits
@@ -37,5 +77,30 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +// CALL GETLOG(USRNAME) +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { yi-wu-

[llvm] [flang] [clang-tools-extra] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Yi Wu via cfe-commits
@@ -6,6 +6,37 @@ // //===--===// +// character.h yi-wu-arm wrote: Replaced by a comment https://github.com/llvm/llvm-project/pull/74628 ___ cfe-c

[clang] [llvm] [clang-tools-extra] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-11 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/27] GETLOG runtime and extension implementation: get login username

[flang] [clang-tools-extra] [clang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/6] GETLOG runtime and extension implementation: get login username Ge

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -13,6 +13,44 @@ #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include + +#ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include + +#include // UNLEN=256 +#include // wcstombs_s +#include // w

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[clang] [llvm] [flang] [clang-tools-extra] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str; + int error = getlogin_r(str

[clang] [clang-tools-extra] [llvm] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-15 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/6] GETLOG runtime and extension implementation: get login username Ge

[flang] [llvm] [clang] [clang-tools-extra] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-15 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/5] FDATE extension implementation: get date and time in ctime format

[flang] [llvm] [clang] [clang-tools-extra] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-15 Thread Yi Wu via cfe-commits
PAX-12-WU wrote: update based on: https://github.com/llvm/llvm-project/pull/70917#discussion_r1393878064 Emit a Fortran runtime failure (instead of `assert`) https://github.com/llvm/llvm-project/pull/70917#discussion_r1393905238 Space filling `fdate` now produce the same result on flang, comp

[llvm] [flang] [clang-tools-extra] [clang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-15 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/5] FDATE extension implementation: get date and time in ctime format

[clang] [libcxx] [libc] [compiler-rt] [clang-tools-extra] [flang] [llvm] [lldb] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-16 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/6] FDATE extension implementation: get date and time in ctime format

[clang] [libcxx] [libc] [compiler-rt] [clang-tools-extra] [flang] [llvm] [lldb] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-16 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/6] FDATE extension implementation: get date and time in ctime format

[clang-tools-extra] [libcxx] [llvm] [compiler-rt] [libc] [flang] [clang] [lldb] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-16 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/6] FDATE extension implementation: get date and time in ctime format

[flang] [llvm] [libc] [compiler-rt] [clang] [clang-tools-extra] [lldb] [libcxx] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-16 Thread Yi Wu via cfe-commits
https://github.com/PAX-12-WU updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/6] FDATE extension implementation: get date and time in ctime format

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-21 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Hello @klausler, could you please share your thoughts or comments on this patch, particularly with regard to the Windows side? Thanks in advance. https://github.com/llvm/llvm-project/pull/70917 ___ cfe-commits mailing list cfe-commits

[lldb] [libc] [flang] [clang-tools-extra] [compiler-rt] [llvm] [libcxx] [clang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-21 Thread Yi Wu via cfe-commits
@@ -10,9 +10,26 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "terminator.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include "flang/Runtim

[lldb] [libc] [flang] [clang-tools-extra] [compiler-rt] [llvm] [libcxx] [clang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-21 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/7] FDATE extension implementation: get date and time in ctime format

[libcxx] [compiler-rt] [lldb] [libc] [flang] [clang-tools-extra] [clang] [llvm] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-21 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/7] FDATE extension implementation: get date and time in ctime format

[flang] [clang-tools-extra] [clang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/7] GETLOG runtime and extension implementation: get login username Ge

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/8] GETLOG runtime and extension implementation: get login username Ge

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str = {}; + + int error = getlogi

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/9] GETLOG runtime and extension implementation: get login username Ge

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/10] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [flang] [clang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-13 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Hi @jeanPerier Sorry to throw a ping. I have changed the structure and implementation of `getlog`, it now does the following: On Linux: use `getlogin_r`, if fail get from environment variable. On Windows: get from environment variable to avoid linking to library `Advapi32.lib`

[clang-tools-extra] [flang] [clang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-13 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/28] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [flang] [clang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-13 Thread Yi Wu via cfe-commits
@@ -6,6 +6,37 @@ // //===--===// +// Defines a utility function for copying and padding characters +#ifndef CHARACTER_H +#define CHARACTER_H yi-wu-arm wrote: Thanks for pointing this out, I

[llvm] [flang] [clang-tools-extra] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-13 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/29] GETLOG runtime and extension implementation: get login username

[clang] [clang-tools-extra] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-13 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/30] GETLOG runtime and extension implementation: get login username

[clang] [clang-tools-extra] [llvm] [flang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-13 Thread Yi Wu via cfe-commits
@@ -10,13 +10,29 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "flang/Runtime/character.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#if _R

[clang-tools-extra] [flang] [clang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-14 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/31] GETLOG runtime and extension implementation: get login username

[clang] [clang-tools-extra] [flang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-15 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Windows CI failure: compiler out of heap space. https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [compiler-rt] [flang] [libcxx] [libc] [llvm] [clang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-11-23 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 1/8] FDATE extension implementation: get date and time in ctime format

[flang] [clang] [clang-tools-extra] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-27 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: > > Hello @klausler, could you please share your thoughts or comments on this > > patch, particularly with regard to the Windows side? Thanks in advance. > > You should use modern C++ braced initialization in flang/runtime. Hi @klausler. Thanks for the comment! I have updated

[clang] [llvm] [flang] [clang-tools-extra] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-27 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/11] GETLOG runtime and extension implementation: get login username

[clang-tools-extra] [flang] [clang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-28 Thread Yi Wu via cfe-commits
@@ -9,6 +9,17 @@ // Defines the API between compiled code and the implementations of time-related // intrinsic subroutines in the runtime library. +// time-intrinsic.h +#ifndef TIME_INTRINSIC_H +#define TIME_INTRINSIC_H + +#include + +void copyBufferAndPad( +char *dest,

[clang] [flang] [llvm] [clang-tools-extra] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-12-04 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Hi @klausler, thanks for the comment, I have changed the initial letters and add `const` to buffer in function declaration. Is there anything else I should pay attention to? Thanks in advance! https://github.com/llvm/llvm-project/pull/70917

[flang] [clang-tools-extra] [llvm] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-21 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm closed https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [compiler-rt] [llvm] [libc] [clang] [flang] [libcxx] [clang-tools-extra] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-21 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/12] FDATE extension implementation: get date and time in ctime format

[lldb] [compiler-rt] [llvm] [libc] [clang] [flang] [libcxx] [clang-tools-extra] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-21 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/13] FDATE extension implementation: get date and time in ctime format

[clang-tools-extra] [lldb] [compiler-rt] [llvm] [libcxx] [flang] [libc] [clang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-21 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/14] FDATE extension implementation: get date and time in ctime format

[clang] [llvm] [clang-tools-extra] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -173,5 +173,145 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator &terminator)

[clang] [llvm] [clang-tools-extra] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from, bool toIsContiguous, bool fromIsContiguous); RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from); +RT_API_ATTRS const char *EnsureNullTerminated( +

[clang-tools-extra] [clang] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from, bool toIsContiguous, bool fromIsContiguous); RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from); +RT_API_ATTRS const char *EnsureNullTerminated( +

[clang-tools-extra] [clang] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from, bool toIsContiguous, bool fromIsContiguous); RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from); +RT_API_ATTRS const char *EnsureNullTerminated( +

[clang-tools-extra] [clang] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -173,5 +173,141 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator &terminator)

[llvm] [clang-tools-extra] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from, bool toIsContiguous, bool fromIsContiguous); RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from); +RT_API_ATTRS const char *EnsureNullTerminated( +

[llvm] [clang-tools-extra] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -173,5 +173,141 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator &terminator)

[llvm] [clang-tools-extra] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-21 Thread Yi Wu via cfe-commits
@@ -173,5 +173,141 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator &terminator)

[llvm] [clang] [clang-tools-extra] [compiler-rt] [lldb] [flang] [libcxx] [libc] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/15] FDATE extension implementation: get date and time in ctime format

[flang] [lldb] [libc] [llvm] [clang-tools-extra] [compiler-rt] [libcxx] [clang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/16] FDATE extension implementation: get date and time in ctime format

[lldb] [libcxx] [clang] [clang-tools-extra] [libc] [llvm] [compiler-rt] [flang] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2023-12-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/71222 >From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:55:06 + Subject: [PATCH 01/17] FDATE extension implementation: get date and time in ctime format

[clang-tools-extra] [flang] [llvm] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -0,0 +1,31 @@ +//===-- include/flang/Runtime/command.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[flang] [clang] [clang-tools-extra] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -0,0 +1,31 @@ +//===-- include/flang/Runtime/command.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm] [clang-tools-extra] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -411,6 +412,24 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from, bool toIsContiguous, bool fromIsContiguous); RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from); +RT_API_ATTRS const char *EnsureNullTerminated( +

[llvm] [flang] [clang] [clang-tools-extra] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -173,5 +173,70 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator &terminator) {

[llvm] [clang-tools-extra] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -173,5 +173,70 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from) { ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous()); } +RT_API_ATTRS const char *EnsureNullTerminated( +const char *str, size_t length, Terminator &terminator) {

[llvm] [clang-tools-extra] [clang] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -0,0 +1,203 @@ +//===-- runtime/execute.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm] [clang-tools-extra] [clang] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
@@ -0,0 +1,203 @@ +//===-- runtime/execute.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang] [llvm] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2023-12-28 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm edited https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [flang] [clang] [libc] [llvm] [compiler-rt] [libcxx] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2024-01-03 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Hi @klausler , any thought of this patch? Thank in advance! https://github.com/llvm/llvm-project/pull/71222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [flang] [compiler-rt] [clang] [libc] [lldb] [clang-tools-extra] [libcxx] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2024-01-03 Thread Yi Wu via cfe-commits
@@ -43,6 +66,26 @@ void FORTRAN_PROCEDURE_NAME(flush)(const int &unit) { } } // namespace io +// CALL FDATE(DATE) +void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *arg, std::int64_t length) { + // Day Mon dd hh:mm:ss \n\0 is 26 characters, e.g. + // Tue May 26 21:51:03 2015

[clang-tools-extra] [flang] [llvm] [libc] [compiler-rt] [lldb] [clang] [libcxx] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2024-01-03 Thread Yi Wu via cfe-commits
@@ -43,6 +66,26 @@ void FORTRAN_PROCEDURE_NAME(flush)(const int &unit) { } } // namespace io +// CALL FDATE(DATE) +void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *arg, std::int64_t length) { + // Day Mon dd hh:mm:ss \n\0 is 26 characters, e.g. + // Tue May 26 21:51:03 2015

[clang-tools-extra] [flang] [llvm] [libc] [compiler-rt] [lldb] [clang] [libcxx] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2024-01-03 Thread Yi Wu via cfe-commits
@@ -22,6 +22,9 @@ extern "C" { // CALL FLUSH(n) antedates the Fortran 2003 FLUSH statement. void FORTRAN_PROCEDURE_NAME(flush)(const int &unit); +// GNU extension subroutine FDATE +void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *string, std::int64_t length); yi-

  1   2   >