[llvm-dev] llvm::opt::ArgStringList const char* vs llvm::StringRef
Duncan P. N. Exon Smith via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 13 09:42:49 PDT 2016
From the class comment, it looks like ArgStringList is designed for
building "argv" lists for invoking subprocesses. Thinks like ::exec
and ::posix_spawn take a `const char *argv[]` parameter. Building
an array of `StringRef` wouldn't actually solve the problem at hand.
> On 2016-Apr-12, at 20:18, <Alexander G. Riccio> via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I noticed that ArgStringList - a very widely used type - uses raw const char* to hold strings, instead of wonderfully useful StringRef helper. Is there a technical reason for this? Does ArgStringList predate StringRef? Is it just that ArgStringList is too widely used to make any kind of breaking change?
>
>
> Sincerely,
> Alexander Riccio
> --
> "Change the world or go home."
> about.me/ariccio
>
> If left to my own devices, I will build more.
> ⁂
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list