From 7a47ee51a145a40332311330ef45b5d62d8ae023 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 20 Jun 2022 22:45:45 -0700 Subject: [llvm] Don't use Optional::getValue (NFC) --- llvm/lib/Object/WasmObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/WasmObjectFile.cpp') 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( "number of data segments does not match DataCount section"); DataSegments.reserve(Count); -- cgit v1.1