Use None to construct an empty ArrayRef. NFC.
authorPete Cooper <peter_cooper@apple.com>
Thu, 24 Mar 2016 17:39:34 +0000 (17:39 +0000)
committerPete Cooper <peter_cooper@apple.com>
Thu, 24 Mar 2016 17:39:34 +0000 (17:39 +0000)
Suggested by David Blaikie in response to r264234.

llvm-svn: 264311

lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp

index 96070ba..b9e7329 100644 (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);