summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2018-02-23 21:14:47 +0000
committerEric Christopher <echristo@gmail.com>2018-02-23 21:14:47 +0000
commit545932bec992f5845fa780c26610d08cbb764bc0 (patch)
tree55a24d701b4606110d24d99e0a73f57f11b74ed5 /llvm/lib/MC
parente8b072d9e48881c4b84793acd554cc85e641b05f (diff)
downloadbcm5719-llvm-545932bec992f5845fa780c26610d08cbb764bc0.tar.gz
bcm5719-llvm-545932bec992f5845fa780c26610d08cbb764bc0.zip
Simplify a DEBUG statement to remove a set but not used variable in release builds.
llvm-svn: 325959
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 1f1132aae49..8b32cc4c7b5 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/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())
OpenPOWER on IntegriCloud