Skip to content

Commit

Permalink
[MC] Make MCCodeEmitter::encodeInstruction pure virtual
Browse files Browse the repository at this point in the history
An empty implementation is almost always inappropriate
(DXILMCCodeEmitter::encodeInstruction is an exception).
Make the function pure virtual as before https://reviews.llvm.org/D145791
  • Loading branch information
MaskRay committed Aug 11, 2023
1 parent 1406f09 commit cc6a704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/include/llvm/MC/MCCodeEmitter.h
Expand Up @@ -39,7 +39,7 @@ class MCCodeEmitter {
/// Encode the given \p Inst to bytes and append to \p CB.
virtual void encodeInstruction(const MCInst &Inst, SmallVectorImpl<char> &CB,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const {}
const MCSubtargetInfo &STI) const = 0;
};

} // end namespace llvm
Expand Down

0 comments on commit cc6a704

Please sign in to comment.