[flang-commits] [flang] [llvm] [flang] Implement 'F_C_STRING' library function (Fortran 2023) (PR #174474)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Fri Jan 30 07:33:14 PST 2026
================
@@ -843,6 +843,30 @@ void RTDEF(Repeat)(Descriptor &result, const Descriptor &string,
}
}
+// F_C_STRING - Appends null terminator to create C-compatible string
+// If asis is false, trailing blanks are trimmed first
+void RTDEF(FCString)(Descriptor &result, const Descriptor &string,
+ const Descriptor *asis, const char *sourceFile, int sourceLine) {
+ Terminator terminator{sourceFile, sourceLine};
+ RUNTIME_CHECK(terminator, string.raw().type == CFI_type_char);
+
----------------
klausler wrote:
Don't lengthen function bodies with needless blank lines. It makes it harder to see entire function bodies at once in an editor.
https://github.com/llvm/llvm-project/pull/174474
More information about the flang-commits
mailing list