summaryrefslogtreecommitdiffstats
path: root/lib/Support/DataExtractor.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
committerdim <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
commite27feadae0885aa074df58ebfda2e7a7f7a7d590 (patch)
treef5944309621cee4fe0976be6f9ac619b7ebfc4c2 /lib/Support/DataExtractor.cpp
parent87ba4fbed530c9d0dff7505d121035f5ed09c9f3 (diff)
downloadFreeBSD-src-e27feadae0885aa074df58ebfda2e7a7f7a7d590.zip
FreeBSD-src-e27feadae0885aa074df58ebfda2e7a7f7a7d590.tar.gz
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_350/final@216957
Diffstat (limited to 'lib/Support/DataExtractor.cpp')
-rw-r--r--lib/Support/DataExtractor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/DataExtractor.cpp b/lib/Support/DataExtractor.cpp
index a564d21..5d6d60a 100644
--- a/lib/Support/DataExtractor.cpp
+++ b/lib/Support/DataExtractor.cpp
@@ -21,7 +21,7 @@ static T getU(uint32_t *offset_ptr, const DataExtractor *de,
if (de->isValidOffsetForDataOfSize(offset, sizeof(val))) {
std::memcpy(&val, &Data[offset], sizeof(val));
if (sys::IsLittleEndianHost != isLittleEndian)
- val = sys::SwapByteOrder(val);
+ sys::swapByteOrder(val);
// Advance the offset
*offset_ptr += sizeof(val);
@@ -44,7 +44,7 @@ static T *getUs(uint32_t *offset_ptr, T *dst, uint32_t count,
// success
return dst;
}
- return NULL;
+ return nullptr;
}
uint8_t DataExtractor::getU8(uint32_t *offset_ptr) const {
@@ -125,7 +125,7 @@ const char *DataExtractor::getCStr(uint32_t *offset_ptr) const {
*offset_ptr = pos + 1;
return Data.data() + offset;
}
- return NULL;
+ return nullptr;
}
uint64_t DataExtractor::getULEB128(uint32_t *offset_ptr) const {
OpenPOWER on IntegriCloud