aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-08-27 05:25:25 +0000
committerCraig Topper <craig.topper@gmail.com>2014-08-27 05:25:25 +0000
commite1d1294853f88f663639f0d5582eec5b0ad8f9ff (patch)
tree5bd7b736dc5a2637df5b1cf458986af8e40915ff /llvm/lib/Object/COFFObjectFile.cpp
parent3af97225291fe0c74ece7e15d6b45773a2a60007 (diff)
downloadllvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.zip
llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.tar.gz
llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.tar.bz2
Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.
llvm-svn: 216525
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 0c2ec11..94e5b1e 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -783,8 +783,7 @@ ArrayRef<uint8_t> COFFObjectFile::getSymbolAuxData(
== 0 && "Aux Symbol data did not point to the beginning of a symbol");
# endif
}
- return ArrayRef<uint8_t>(Aux,
- Symbol->NumberOfAuxSymbols * sizeof(coff_symbol));
+ return makeArrayRef(Aux, Symbol->NumberOfAuxSymbols * sizeof(coff_symbol));
}
std::error_code COFFObjectFile::getSectionName(const coff_section *Sec,
@@ -825,8 +824,8 @@ COFFObjectFile::getSectionContents(const coff_section *Sec,
uintptr_t ConEnd = ConStart + Sec->SizeOfRawData;
if (ConEnd > uintptr_t(Data.getBufferEnd()))
return object_error::parse_failed;
- Res = ArrayRef<uint8_t>(reinterpret_cast<const unsigned char*>(ConStart),
- Sec->SizeOfRawData);
+ Res = makeArrayRef(reinterpret_cast<const uint8_t*>(ConStart),
+ Sec->SizeOfRawData);
return object_error::success;
}