aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 22:45:45 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 22:45:45 -0700
commit7a47ee51a145a40332311330ef45b5d62d8ae023 (patch)
tree2e7ac16bc8430595cbe68692d08111f028b5f995 /llvm/lib/Object/WasmObjectFile.cpp
parent9cfbe7bbfea762d72b60c51c8ab5dadf6b317a9a (diff)
downloadllvm-7a47ee51a145a40332311330ef45b5d62d8ae023.zip
llvm-7a47ee51a145a40332311330ef45b5d62d8ae023.tar.gz
llvm-7a47ee51a145a40332311330ef45b5d62d8ae023.tar.bz2
[llvm] Don't use Optional::getValue (NFC)
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 0e99c21..cc80ae9 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -1520,7 +1520,7 @@ Error WasmObjectFile::parseElemSection(ReadContext &Ctx) {
Error WasmObjectFile::parseDataSection(ReadContext &Ctx) {
DataSection = Sections.size();
uint32_t Count = readVaruint32(Ctx);
- if (DataCount && Count != DataCount.getValue())
+ if (DataCount && Count != *DataCount)
return make_error<GenericBinaryError>(
"number of data segments does not match DataCount section");
DataSegments.reserve(Count);