[llvm] 6f4ed8c - [M68k][Disassembler][NFC] Decorate dump methods with LLVM_DUMP_METHOD
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 12:02:54 PDT 2021
Author: Min-Yih Hsu
Date: 2021-04-22T12:02:07-07:00
New Revision: 6f4ed8c0bd5000819864f0584c0ce086c388b720
URL: https://github.com/llvm/llvm-project/commit/6f4ed8c0bd5000819864f0584c0ce086c388b720
DIFF: https://github.com/llvm/llvm-project/commit/6f4ed8c0bd5000819864f0584c0ce086c388b720.diff
LOG: [M68k][Disassembler][NFC] Decorate dump methods with LLVM_DUMP_METHOD
And guard them with proper macro conditions. NFC.
Added:
Modified:
llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp b/llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp
index 8045251c30ef8..a8453c838493d 100644
--- a/llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp
+++ b/llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp
@@ -141,6 +141,8 @@ static unsigned RegisterDecode[] = {
M68k::D4, M68k::D5, M68k::D6, M68k::D7,
};
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+LLVM_DUMP_METHOD
void M68kInstructionBuffer::dump() const {
for (auto Word : Buffer) {
for (unsigned B = 0; B < 16; ++B) {
@@ -159,6 +161,7 @@ void M68kInstructionBuffer::dump() const {
dbgs() << "\n";
}
+#endif
M68kInstructionBuffer M68kInstructionBuffer::fill(ArrayRef<uint8_t> Bytes) {
SmallVector<uint16_t, MaxInstructionWords> Buffer;
@@ -218,6 +221,8 @@ bool M68kInstructionLookup::matches(const M68kInstructionBuffer &Test) const {
return true;
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+LLVM_DUMP_METHOD
void M68kInstructionLookup::dump() const {
dbgs() << "M68kInstructionLookup " << OpCode << " ";
@@ -242,6 +247,7 @@ void M68kInstructionLookup::dump() const {
dbgs() << "\n";
}
+#endif
bool M68kInstructionLookupBuilder::isValid() const {
for (unsigned I = 0, E = numWords(); I < E; ++I)
More information about the llvm-commits
mailing list