[flang-commits] [flang] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Wed Dec 13 09:15:54 PST 2023


================
@@ -282,4 +282,40 @@ std::int32_t RTNAME(GetEnvVariable)(const Descriptor &name,
   return StatOk;
 }
 
+const char *ensureNullTerminated(
+    const char *str, size_t length, Terminator &terminator) {
+  if (length <= strlen(str)) {
----------------
klausler wrote:

Please call `std::strlen` and `runtime::AllocateMemoryOrCrash` here instead.

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


More information about the flang-commits mailing list