[Lldb-commits] [PATCH] D50026: Remove Stream::UnitTest

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 30 15:57:54 PDT 2018


teemperor created this revision.

No one is using this method, and it also doesn't really make a lot of sense to have it around.


https://reviews.llvm.org/D50026

Files:
  include/lldb/Utility/Stream.h
  source/Utility/Stream.cpp


Index: source/Utility/Stream.cpp
===================================================================
--- source/Utility/Stream.cpp
+++ source/Utility/Stream.cpp
@@ -526,48 +526,3 @@
     m_flags.Set(eBinary);
   return bytes_written;
 }
-
-void Stream::UnitTest(Stream *s) {
-  s->PutHex8(0x12);
-
-  s->PutChar(' ');
-  s->PutHex16(0x3456, endian::InlHostByteOrder());
-  s->PutChar(' ');
-  s->PutHex16(0x3456, eByteOrderBig);
-  s->PutChar(' ');
-  s->PutHex16(0x3456, eByteOrderLittle);
-
-  s->PutChar(' ');
-  s->PutHex32(0x789abcde, endian::InlHostByteOrder());
-  s->PutChar(' ');
-  s->PutHex32(0x789abcde, eByteOrderBig);
-  s->PutChar(' ');
-  s->PutHex32(0x789abcde, eByteOrderLittle);
-
-  s->PutChar(' ');
-  s->PutHex64(0x1122334455667788ull, endian::InlHostByteOrder());
-  s->PutChar(' ');
-  s->PutHex64(0x1122334455667788ull, eByteOrderBig);
-  s->PutChar(' ');
-  s->PutHex64(0x1122334455667788ull, eByteOrderLittle);
-
-  const char *hola = "Hello World!!!";
-  s->PutChar(' ');
-  s->PutCString(hola);
-
-  s->PutChar(' ');
-  s->Write(hola, 5);
-
-  s->PutChar(' ');
-  s->PutCStringAsRawHex8(hola);
-
-  s->PutChar(' ');
-  s->PutCStringAsRawHex8("01234");
-
-  s->PutChar(' ');
-  s->Printf("pid=%i", 12733);
-
-  s->PutChar(' ');
-  s->PrintfAsRawHex8("pid=%i", 12733);
-  s->PutChar('\n');
-}
Index: include/lldb/Utility/Stream.h
===================================================================
--- include/lldb/Utility/Stream.h
+++ include/lldb/Utility/Stream.h
@@ -524,8 +524,6 @@
   //------------------------------------------------------------------
   size_t PutULEB128(uint64_t uval);
 
-  static void UnitTest(Stream *s);
-
 protected:
   //------------------------------------------------------------------
   // Member variables


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50026.158120.patch
Type: text/x-patch
Size: 1769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180730/a8f4dc2b/attachment.bin>


More information about the lldb-commits mailing list