Use None to construct an empty ArrayRef. NFC.
Suggested by David Blaikie in response to r264234. llvm-svn: 264311
This commit is contained in:
parent
506fd0d81d
commit
107ac9e1aa
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue