[llvm] r354745 - Fix "enumeral and non-enumeral type in conditional expression" gcc7 warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 24 05:31:53 PST 2019
Author: rksimon
Date: Sun Feb 24 05:31:52 2019
New Revision: 354745
URL: http://llvm.org/viewvc/llvm-project?rev=354745&view=rev
Log:
Fix "enumeral and non-enumeral type in conditional expression" gcc7 warning. NFCI.
Modified:
llvm/trunk/lib/MC/WasmObjectWriter.cpp
Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=354745&r1=354744&r2=354745&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Sun Feb 24 05:31:52 2019
@@ -1254,7 +1254,8 @@ uint64_t WasmObjectWriter::writeObject(M
DataSegments.emplace_back();
WasmDataSegment &Segment = DataSegments.back();
Segment.Name = SectionName;
- Segment.InitFlags = Section.getPassive() ? wasm::WASM_SEGMENT_IS_PASSIVE : 0;
+ Segment.InitFlags =
+ Section.getPassive() ? (uint32_t)wasm::WASM_SEGMENT_IS_PASSIVE : 0;
Segment.Offset = DataSize;
Segment.Section = &Section;
addData(Segment.Data, Section);
More information about the llvm-commits
mailing list