1 //===- lib/MC/MCInst.cpp - MCInst implementation --------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/MC/MCInst.h"
11 #include "llvm/Support/raw_ostream.h"
15 void MCOperand::print(raw_ostream &OS) const {
20 OS << "Reg:" << getReg();
22 OS << "Imm:" << getImm();
23 else if (isMBBLabel())
24 OS << "MBB:(" << getMBBLabelFunction() << ","
25 << getMBBLabelBlock() << ")";
26 else if (isMCValue()) {
28 getMCValue().print(OS);
35 void MCOperand::dump() const {
40 void MCInst::print(raw_ostream &OS) const {
41 OS << "<MCInst " << getOpcode();
42 for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
44 getOperand(i).print(OS);
49 void MCInst::dump() const {