summaryrefslogtreecommitdiffstats
path: root/lib/MC/MCInstPrinter.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-06-09 19:06:30 +0000
committerdim <dim@FreeBSD.org>2015-06-09 19:06:30 +0000
commit9b27354f6f3e9086d5f7abbc373b617209fc35b2 (patch)
tree1dc5e75ab222a9ead44c699eceafab7a6ca7b310 /lib/MC/MCInstPrinter.cpp
parent782067d0278612ee75d024b9b135c221c327e9e8 (diff)
downloadFreeBSD-src-9b27354f6f3e9086d5f7abbc373b617209fc35b2.zip
FreeBSD-src-9b27354f6f3e9086d5f7abbc373b617209fc35b2.tar.gz
Vendor import of llvm trunk r239412:
https://llvm.org/svn/llvm-project/llvm/trunk@239412
Diffstat (limited to 'lib/MC/MCInstPrinter.cpp')
-rw-r--r--lib/MC/MCInstPrinter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/MC/MCInstPrinter.cpp b/lib/MC/MCInstPrinter.cpp
index 0dc3121..23afe80 100644
--- a/lib/MC/MCInstPrinter.cpp
+++ b/lib/MC/MCInstPrinter.cpp
@@ -16,6 +16,15 @@
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
+void llvm::dumpBytes(ArrayRef<uint8_t> bytes, raw_ostream &OS) {
+ static const char hex_rep[] = "0123456789abcdef";
+ for (char i: bytes) {
+ OS << hex_rep[(i & 0xF0) >> 4];
+ OS << hex_rep[i & 0xF];
+ OS << ' ';
+ }
+}
+
MCInstPrinter::~MCInstPrinter() {
}
OpenPOWER on IntegriCloud