summaryrefslogtreecommitdiff
path: root/lib/MC/MCInstPrinter.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-09-15 23:38:46 +0000
committerOwen Anderson <resistor@mac.com>2011-09-15 23:38:46 +0000
commit98c5ddabca1debf935a07d14d0cbc9732374bdb8 (patch)
tree74e944d1e23e4ead852d53c54a5946ae6f1e56f8 /lib/MC/MCInstPrinter.cpp
parent71280b55a3406c7dd4215449bf4a3ab216e78ffd (diff)
downloadllvm-98c5ddabca1debf935a07d14d0cbc9732374bdb8.tar.gz
llvm-98c5ddabca1debf935a07d14d0cbc9732374bdb8.tar.bz2
llvm-98c5ddabca1debf935a07d14d0cbc9732374bdb8.tar.xz
Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCInstPrinter.cpp')
-rw-r--r--lib/MC/MCInstPrinter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/MC/MCInstPrinter.cpp b/lib/MC/MCInstPrinter.cpp
index f0fa2cda4a..e15e107616 100644
--- a/lib/MC/MCInstPrinter.cpp
+++ b/lib/MC/MCInstPrinter.cpp
@@ -8,8 +8,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCInstPrinter.h"
-#include "llvm/MC/MCAsmInfo.h"
-#include "llvm/MC/MCInst.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -27,8 +25,6 @@ void MCInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
assert(0 && "Target should implement this");
}
-void MCInstPrinter::printAnnotations(const MCInst *MI, raw_ostream &OS) {
- for (unsigned i = 0, e = MI->getNumAnnotations(); i != e; ++i) {
- OS << MI->getAnnotation(i) << "\n";
- }
+void MCInstPrinter::printAnnotation(raw_ostream &OS, StringRef Annot) {
+ if (!Annot.empty()) OS << Annot << "\n";
}