[AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction into AVRMCCodeEmitter::encodeInstr...
authorJianjian GUAN <jacquesguan@me.com>
Mon, 17 Jul 2023 08:02:25 +0000 (16:02 +0800)
committerJianjian GUAN <jacquesguan@me.com>
Tue, 18 Jul 2023 02:57:38 +0000 (10:57 +0800)
commit0d6530728ff202849a5d30d0db4e1fdb5b11ce7b
tree60cf1b5b2a8bc9e15ec9586acf6a033c44704391
parent9c2f792dceb626f57c577b02468562e1e84822f1
[AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction into AVRMCCodeEmitter::encodeInstruction.

The reasons are:
1, `AVRMCCodeEmitter::emitInstruction` has only one use which is `AVRMCCodeEmitter::encodeInstruction`, and the parameter `STI` is not used in this function. I think it might be copied from other target.
2, We do have `AVRAsmPrinter::emitInstruction`, and it would invoke `AVRMCCodeEmitter::encodeInstruction` in its calling chain, so if we call `AVRMCCodeEmitter::emitInstruction` in `AVRMCCodeEmitter::encodeInstruction`, it would be confusing.

Reviewed By: benshi001

Differential Revision: https://reviews.llvm.org/D155426
llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.cpp
llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.h