[llvm] r369318 - [WebAssembly][MC] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r369317

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 19:02:58 PDT 2019


Author: maskray
Date: Mon Aug 19 19:02:57 2019
New Revision: 369318

URL: http://llvm.org/viewvc/llvm-project?rev=369318&view=rev
Log:
[WebAssembly][MC] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r369317

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=369318&r1=369317&r2=369318&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Mon Aug 19 19:02:57 2019
@@ -426,10 +426,8 @@ void WasmObjectWriter::recordRelocation(
                                         const MCFragment *Fragment,
                                         const MCFixup &Fixup, MCValue Target,
                                         uint64_t &FixedValue) {
-  MCAsmBackend &Backend = Asm.getBackend();
-
   // The WebAssembly backend should never generate FKF_IsPCRel fixups
-  assert(!(Backend.getFixupKindInfo(Fixup.getKind()).Flags &
+  assert(!(Asm.getBackend().getFixupKindInfo(Fixup.getKind()).Flags &
            MCFixupKindInfo::FKF_IsPCRel));
 
   const auto &FixupSection = cast<MCSectionWasm>(*Fragment->getParent());




More information about the llvm-commits mailing list