[all-commits] [llvm/llvm-project] 481e2d: [CSKY] AsmBackend: Wrap Inst.dump() in LLVM_DEBUG

Kees Cook via All-commits all-commits at lists.llvm.org
Thu Mar 31 23:27:22 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 481e2ddef452a261a202ec60b02ab8b31f022c7f
      https://github.com/llvm/llvm-project/commit/481e2ddef452a261a202ec60b02ab8b31f022c7f
  Author: Kees Cook <keescook at chromium.org>
  Date:   2022-03-31 (Thu, 31 Mar 2022)

  Changed paths:
    M llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp

  Log Message:
  -----------
  [CSKY] AsmBackend: Wrap Inst.dump() in LLVM_DEBUG

-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=CSKY -DLLVM_ENABLE_ASSERTIONS=OFF
builds will fail to link due to undefined `llvm::MCInst::dump() const`

```
ld.lld: error: undefined symbol: llvm::MCInst::dump() const
>>> referenced by CSKYAsmBackend.cpp
>>>               /home/kees/src/built-compilers/llvm/stage2-prof-gen/lto.cache/llvmcache-0656FC38C728A7FE0F767D10CD84C7F820114C46:(llvm::CSKYAsmBackend::relaxInstruction(llvm::MCInst&, llvm::MCSubtargetInfo const&) const)
```

Wrap it in LLVM_DEBUG().

Fixes https://github.com/llvm/llvm-project/issues/54684

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D122854




More information about the All-commits mailing list