]> granicus.if.org Git - clang/commit
Refactor ExecuteAndWait to take StringRefs.
authorZachary Turner <zturner@google.com>
Tue, 12 Jun 2018 17:43:52 +0000 (17:43 +0000)
committerZachary Turner <zturner@google.com>
Tue, 12 Jun 2018 17:43:52 +0000 (17:43 +0000)
commit65eda1a8360bec118893f240d584aa20e79e972f
tree9c1060eb8107707234dfedcfa00c9a556d759ff4
parentf91c23afb2691f7b7a3a4a0516fb0bb9626f8eb5
Refactor ExecuteAndWait to take StringRefs.

This simplifies some code which had StringRefs to begin with, and
makes other code more complicated which had const char* to begin
with.

In the end, I think this makes for a more idiomatic and platform
agnostic API.  Not all platforms launch process with null terminated
c-string arrays for the environment pointer and argv, but the api
was designed that way because it allowed easy pass-through for
posix-based platforms.  There's a little additional overhead now
since on posix based platforms we'll be takign StringRefs which
were constructed from null terminated strings and then copying
them to null terminate them again, but from a readability and
usability standpoint of the API user, I think this API signature
is strictly better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334518 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Job.cpp
lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
tools/clang-offload-bundler/ClangOffloadBundler.cpp