[flang] [llvm] [flang] Implement 'F_C_STRING' library function (Fortran 2023) (PR #174474)

Caroline Newcombe via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 9 08:53:34 PST 2026


================
@@ -843,6 +843,26 @@ 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) {
----------------
cenewcombe wrote:

Thank you, I completely agree. I have made asis a bool with corresponding changes made in codegen and the lowering tests.

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


More information about the llvm-commits mailing list