[PATCH] D111785: [flang] runtime: Read environment variables directly

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 02:32:05 PDT 2021


rovka updated this revision to Diff 381895.
rovka edited the summary of this revision.
rovka added a comment.

Updated to crash if we fail to allocate the c-style string. Introducing the crash behavior made NullTerminatedString look pretty much the same as SaveDefaultCharacter, so I used that one instead and completely removed the former, along with the specialization of OwningPtr<char []>.

I haven't changed anything with regards to envp versus getenv. My thoughts are that if envp can become stale, we should remove it completely and use only getenv, but that should probably be a separate patch. What do you think?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111785/new/

https://reviews.llvm.org/D111785

Files:
  flang/include/flang/Runtime/command.h
  flang/runtime/command.cpp
  flang/runtime/environment.cpp
  flang/runtime/environment.h
  flang/runtime/tools.cpp
  flang/unittests/Runtime/CommandTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111785.381895.patch
Type: text/x-patch
Size: 5641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211025/2f28a26e/attachment.bin>


More information about the llvm-commits mailing list