From 217de730f3b299408f6174fc3744426466d7dfa1 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 23 Feb 2018 21:14:47 +0000 Subject: [PATCH] Simplify a DEBUG statement to remove a set but not used variable in release builds. llvm-svn: 325959 --- lib/MC/WasmObjectWriter.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp index 1f1132aae49..8b32cc4c7b5 100644 --- a/lib/MC/WasmObjectWriter.cpp +++ b/lib/MC/WasmObjectWriter.cpp @@ -1181,15 +1181,12 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, DEBUG(dbgs() << " -> segment index: " << Ref.Segment); } else { // A "true" Wasm global (currently just __stack_pointer) - unsigned WasmIndex; - if (WS.isDefined()) { + if (WS.isDefined()) report_fatal_error("don't yet support defined globals"); - } else { - // An import; the index was assigned above - WasmIndex = WasmIndices.find(&WS)->second; - } - DEBUG(dbgs() << " -> global index: " << WasmIndex << "\n"); + // An import; the index was assigned above + DEBUG(dbgs() << " -> global index: " << WasmIndices.find(&WS)->second + << "\n"); } if (WS.isDefined())