[wasm] Fix uninitialized memory introduced in r330749.
Found with MSan. This was causing all the WASM MC tests to fail about
10% of the time.
llvm-svn: 330764
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 39b49b0..0f8a42a 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -216,7 +216,7 @@
std::vector<WasmCustomSection> CustomSections;
unsigned NumFunctionImports = 0;
unsigned NumGlobalImports = 0;
- uint32_t SectionCount;
+ uint32_t SectionCount = 0;
// TargetObjectWriter wrappers.
bool is64Bit() const { return TargetObjectWriter->is64Bit(); }