Use None to construct an empty ArrayRef. NFC.

Suggested by David Blaikie in response to r264234.

llvm-svn: 264311
This commit is contained in:
Pete Cooper 2016-03-24 17:39:34 +00:00
parent 506fd0d81d
commit 107ac9e1aa
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ struct MappingTraits<Section> {
assert(file != nullptr);
size_t size = _normalizedContent.size();
if (!size)
return ArrayRef<uint8_t>();
return None;
uint8_t *bytes = file->ownedAllocations.Allocate<uint8_t>(size);
std::copy(_normalizedContent.begin(), _normalizedContent.end(), bytes);
return makeArrayRef(bytes, size);