diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
commit | f8af5cf600354830d4ccf59732403f0f073eccb9 (patch) | |
tree | 2ba0398b4c42ad4f55561327538044fd2c925a8b /tools/obj2yaml/obj2yaml.cpp | |
parent | 59d6cff90eecf31cb3dd860c4e786674cfdd42eb (diff) |
Diffstat (limited to 'tools/obj2yaml/obj2yaml.cpp')
-rw-r--r-- | tools/obj2yaml/obj2yaml.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/tools/obj2yaml/obj2yaml.cpp b/tools/obj2yaml/obj2yaml.cpp index 821c9ac7d3a1e..8d128b3539448 100644 --- a/tools/obj2yaml/obj2yaml.cpp +++ b/tools/obj2yaml/obj2yaml.cpp @@ -18,38 +18,6 @@ using namespace llvm; -namespace objyaml { // generic yaml-writing specific routines - -unsigned char printable(unsigned char Ch) { - return Ch >= ' ' && Ch <= '~' ? Ch : '.'; -} - -raw_ostream &writeHexStream(raw_ostream &Out, const ArrayRef<uint8_t> arr) { - const char *hex = "0123456789ABCDEF"; - Out << " !hex \""; - - typedef ArrayRef<uint8_t>::const_iterator iter_t; - const iter_t end = arr.end(); - for (iter_t iter = arr.begin(); iter != end; ++iter) - Out << hex[(*iter >> 4) & 0x0F] << hex[(*iter & 0x0F)]; - - Out << "\" # |"; - for (iter_t iter = arr.begin(); iter != end; ++iter) - Out << printable(*iter); - Out << "|\n"; - - return Out; -} - -raw_ostream &writeHexNumber(raw_ostream &Out, unsigned long long N) { - if (N >= 10) - Out << "0x"; - Out.write_hex(N); - return Out; -} - -} // end namespace yaml - namespace { enum ObjectFileType { coff |