[llvm] r183148 - Remove dead code.

Rafael Espindola rafael.espindola at gmail.com
Mon Jun 3 12:42:58 PDT 2013


Author: rafael
Date: Mon Jun  3 14:42:57 2013
New Revision: 183148

URL: http://llvm.org/viewvc/llvm-project?rev=183148&view=rev
Log:
Remove dead code.

Thanks to Sean Silva for noticing it!

Modified:
    llvm/trunk/tools/obj2yaml/obj2yaml.cpp
    llvm/trunk/tools/obj2yaml/obj2yaml.h

Modified: llvm/trunk/tools/obj2yaml/obj2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/obj2yaml.cpp?rev=183148&r1=183147&r2=183148&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/obj2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/obj2yaml.cpp Mon Jun  3 14:42:57 2013
@@ -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

Modified: llvm/trunk/tools/obj2yaml/obj2yaml.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/obj2yaml.h?rev=183148&r1=183147&r2=183148&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/obj2yaml.h (original)
+++ llvm/trunk/tools/obj2yaml/obj2yaml.h Mon Jun  3 14:42:57 2013
@@ -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





More information about the llvm-commits mailing list