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

Chris Lattner clattner at apple.com
Wed Nov 11 10:33:20 PST 2009


On Nov 11, 2009, at 10:16 AM, Daniel Dunbar wrote:

> 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.

Two options: use SmallVector, which can be forward declared, or put the new StringRef version into StringExtras.h.  I assume it's the contents of StringExtras that you don't like, not the actual file :)

-Chris



More information about the cfe-dev mailing list