[RISCV] Refactor predicates for rvv intrinsic patterns.
[llvm-project.git] / llvm / lib / MC / MCCodeEmitter.cpp
blobafbe31e0070c91fb08033c8001fc4e47de36b367
1 //===- MCCodeEmitter.cpp - Instruction Encoding ---------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCCodeEmitter.h"
10 #include "llvm/Support/raw_ostream.h"
12 using namespace llvm;
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);