summaryrefslogtreecommitdiff
path: root/tools/obj2yaml
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-03 19:42:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-03 19:42:57 +0000
commit031a179b6d47bf0f478868717e2e364c4e39225c (patch)
tree5af367c9866f198d8d2af82314df16711bbe0a96 /tools/obj2yaml
parent15e5c46e49b5ab02fee6d1da53cb9c129cab5165 (diff)
downloadllvm-031a179b6d47bf0f478868717e2e364c4e39225c.tar.gz
llvm-031a179b6d47bf0f478868717e2e364c4e39225c.tar.bz2
llvm-031a179b6d47bf0f478868717e2e364c4e39225c.tar.xz
Remove dead code.
Thanks to Sean Silva for noticing it! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/obj2yaml')
-rw-r--r--tools/obj2yaml/obj2yaml.cpp32
-rw-r--r--tools/obj2yaml/obj2yaml.h12
2 files changed, 0 insertions, 44 deletions
diff --git a/tools/obj2yaml/obj2yaml.cpp b/tools/obj2yaml/obj2yaml.cpp
index 821c9ac7d3..8d128b3539 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
diff --git a/tools/obj2yaml/obj2yaml.h b/tools/obj2yaml/obj2yaml.h
index 7d52a2d177..bde82e618e 100644
--- a/tools/obj2yaml/obj2yaml.h
+++ b/tools/obj2yaml/obj2yaml.h
@@ -13,22 +13,10 @@
#ifndef LLVM_TOOLS_OBJ2YAML_H
#define LLVM_TOOLS_OBJ2YAML_H
-#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
-namespace objyaml { // routines for writing YAML
-// Write a hex stream:
-// <Prefix> !hex: "<hex digits>" #|<ASCII chars>\n
- llvm::raw_ostream &writeHexStream
- (llvm::raw_ostream &Out, const llvm::ArrayRef<uint8_t> arr);
-
-// Writes a number in hex; prefix it by 0x if it is >= 10
- llvm::raw_ostream &writeHexNumber
- (llvm::raw_ostream &Out, unsigned long long N);
-}
-
llvm::error_code coff2yaml(llvm::raw_ostream &Out, llvm::MemoryBuffer *TheObj);
#endif