Skip to content
Commit b08d9060 authored by Pete Cooper's avatar Pete Cooper
Browse files

StringRef::copy shouldn't allocate anything for length 0 strings.

The BumpPtrAllocator currently doesn't handle zero length allocations well.
The discussion for how to fix that is ongoing.  However, there's no need
for StringRef::copy to actually allocate anything here anyway, so just
return StringRef() when we get a zero length copy.

Reviewed by David Blaikie

llvm-svn: 264201
parent f43c2a0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment