1 //===- MCCodeEmitter.cpp - Instruction Encoding ---------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCCodeEmitter.h"
10 #include "llvm/Support/raw_ostream.h"
14 MCCodeEmitter::MCCodeEmitter() = default;
16 MCCodeEmitter::~MCCodeEmitter() = default;
18 void MCCodeEmitter::encodeInstruction(const MCInst
&Inst
,
19 SmallVectorImpl
<char> &CB
,
20 SmallVectorImpl
<MCFixup
> &Fixups
,
21 const MCSubtargetInfo
&STI
) const {
22 raw_svector_ostream
OS(CB
);
23 encodeInstruction(Inst
, OS
, Fixups
, STI
);