Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting...
[oota-llvm.git] / include / llvm / Object / ELF.h
index fbc48e6d7218c3c39640072c81f7c989888e3669..7c10bbf6e5ab288370196c2b71a082454d6db00b 100644 (file)
@@ -540,7 +540,7 @@ ELFFile<ELFT>::getSectionContents(const Elf_Shdr *Sec) const {
   if (Sec->sh_offset + Sec->sh_size > Buf.size())
     return object_error::parse_failed;
   const uint8_t *Start = base() + Sec->sh_offset;
-  return ArrayRef<uint8_t>(Start, Sec->sh_size);
+  return makeArrayRef(Start, Sec->sh_size);
 }
 
 template <class ELFT>