blob: e15e10761699473f0959ab9e4c92610572877ef0 [file] [log] [blame]
Chris Lattnerde57d8e2009-09-14 01:43:38 +00001//===-- MCInstPrinter.cpp - Convert an MCInst to target assembly syntax ---===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "llvm/MC/MCInstPrinter.h"
Chris Lattner52413812010-02-11 22:39:10 +000011#include "llvm/ADT/StringRef.h"
Owen Andersond1814792011-09-15 18:36:29 +000012#include "llvm/Support/raw_ostream.h"
Chris Lattnerde57d8e2009-09-14 01:43:38 +000013using namespace llvm;
14
15MCInstPrinter::~MCInstPrinter() {
Edward O'Callaghan50d75a62009-10-05 18:43:19 +000016}
Chris Lattner52413812010-02-11 22:39:10 +000017
18/// getOpcodeName - Return the name of the specified opcode enum (e.g.
19/// "MOV32ri") or empty if we can't resolve it.
20StringRef MCInstPrinter::getOpcodeName(unsigned Opcode) const {
21 return "";
22}
Anton Korobeynikove7410dd2011-03-05 18:43:32 +000023
Rafael Espindolad6860522011-06-02 02:34:55 +000024void MCInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
Anton Korobeynikove7410dd2011-03-05 18:43:32 +000025 assert(0 && "Target should implement this");
Anton Korobeynikove7410dd2011-03-05 18:43:32 +000026}
Owen Andersond1814792011-09-15 18:36:29 +000027
Owen Andersona0c3b972011-09-15 23:38:46 +000028void MCInstPrinter::printAnnotation(raw_ostream &OS, StringRef Annot) {
29 if (!Annot.empty()) OS << Annot << "\n";
Owen Andersond1814792011-09-15 18:36:29 +000030}