[CSKY] AsmBackend: Wrap Inst.dump() in LLVM_DEBUG
authorKees Cook <keescook@chromium.org>
Fri, 1 Apr 2022 06:27:10 +0000 (23:27 -0700)
committerFangrui Song <i@maskray.me>
Fri, 1 Apr 2022 06:27:10 +0000 (23:27 -0700)
commit481e2ddef452a261a202ec60b02ab8b31f022c7f
tree35b87a583ee1768d79c85bf53a86332917df3b94
parent43f0d5f934b0f9200f8c661fe7350c71bcabe285
[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
llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp