[cfe-dev] [patch] Add configure option for C include search path

Daniel Dunbar daniel at zuster.org
Wed Nov 11 10:16:22 PST 2009


On Sun, Nov 8, 2009 at 9:16 AM, Rafael Espindola <espindola at google.com> wrote:
> 2009/11/4 Rafael Espindola <espindola at google.com>:
> The llvm patch also includes a new utility function:
> llvm::SplitStringWithEmpty. It is similar to SplitString, but empty
> elements are not removed. I find its semantics more intuitive. That is
> what python implements in string.split() :-). Maybe I should just
> change SplitString and update its users?

I want to kill StringExtras.h. I would propose implementing split() on
StringRef, with a KeepEmpty argument (which should default to true).
Python's MaxSplit is also incredibly useful. See PCHReader:splitLines
for the StringRef version of this.

The only caveat is this can't import std::vector, because StringRef.h
is everywhere and we want to keep its includes as minimal as possible.

 - Daniel

> Cheers,
> --
> Rafael Ávila de Espíndola
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>




More information about the cfe-dev mailing list