summaryrefslogtreecommitdiff
path: root/lld/MachO/EhFrame.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-08-13 12:28:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-08-13 12:28:03 +0000
commit677727e8296a802385345db6fa65e68223f4597a (patch)
treee8b3137703a6bf0c03c6d3b28da1eb9271bae00d /lld/MachO/EhFrame.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Vendor import of llvm-project branch release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d.vendor/llvm-project/llvmorg-15.0.0-rc2-40-gfbd2950d8d0d
Diffstat (limited to 'lld/MachO/EhFrame.cpp')
-rw-r--r--lld/MachO/EhFrame.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/MachO/EhFrame.cpp b/lld/MachO/EhFrame.cpp
index 50d8accc0596..55a85f316cdd 100644
--- a/lld/MachO/EhFrame.cpp
+++ b/lld/MachO/EhFrame.cpp
@@ -58,17 +58,17 @@ uint32_t EhReader::readU32(size_t *off) const {
return v;
}
-uint64_t EhReader::readPointer(size_t *off) const {
- if (*off + wordSize > data.size())
+uint64_t EhReader::readPointer(size_t *off, uint8_t size) const {
+ if (*off + size > data.size())
failOn(*off, "unexpected end of CIE/FDE");
uint64_t v;
- if (wordSize == 8)
+ if (size == 8)
v = read64le(data.data() + *off);
else {
- assert(wordSize == 4);
+ assert(size == 4);
v = read32le(data.data() + *off);
}
- *off += wordSize;
+ *off += size;
return v;
}