diff options
author | Zachary Turner <zturner@google.com> | 2017-06-15 20:55:51 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-06-15 20:55:51 +0000 |
commit | da504b794cf3154ec9b3f0fb728f1b3880a8bb77 (patch) | |
tree | 95d7f819b11df9e7368116ed40595259d29bc539 /llvm/tools/llvm-pdbutil/LinePrinter.cpp | |
parent | 60aac43813beccb33f72d15967ae4f21a789238d (diff) | |
download | bcm5719-llvm-da504b794cf3154ec9b3f0fb728f1b3880a8bb77.tar.gz bcm5719-llvm-da504b794cf3154ec9b3f0fb728f1b3880a8bb77.zip |
Revert "[llvm-pdbutil] rewrite the "raw" output style."
This reverts commit 83ea17ebf2106859a51fbc2a86031b44d33696ad.
This is failing due to some strange template problems, so reverting
until it can be straightened out.
llvm-svn: 305505
Diffstat (limited to 'llvm/tools/llvm-pdbutil/LinePrinter.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbutil/LinePrinter.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/llvm/tools/llvm-pdbutil/LinePrinter.cpp b/llvm/tools/llvm-pdbutil/LinePrinter.cpp index 718d3394e21..ef56b5fe8e6 100644 --- a/llvm/tools/llvm-pdbutil/LinePrinter.cpp +++ b/llvm/tools/llvm-pdbutil/LinePrinter.cpp @@ -13,7 +13,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/PDB/UDTLayout.h" -#include "llvm/Support/Format.h" #include "llvm/Support/Regex.h" #include <algorithm> @@ -61,16 +60,10 @@ LinePrinter::LinePrinter(int Indent, bool UseColor, llvm::raw_ostream &Stream) opts::pretty::IncludeCompilands.end()); } -void LinePrinter::Indent(uint32_t Amount) { - if (Amount == 0) - Amount = IndentSpaces; - CurrentIndent += Amount; -} +void LinePrinter::Indent() { CurrentIndent += IndentSpaces; } -void LinePrinter::Unindent(uint32_t Amount) { - if (Amount == 0) - Amount = IndentSpaces; - CurrentIndent = std::max<int>(0, CurrentIndent - Amount); +void LinePrinter::Unindent() { + CurrentIndent = std::max(0, CurrentIndent - IndentSpaces); } void LinePrinter::NewLine() { @@ -78,13 +71,6 @@ void LinePrinter::NewLine() { OS.indent(CurrentIndent); } -void LinePrinter::print(const Twine &T) { OS << T; } - -void LinePrinter::printLine(const Twine &T) { - NewLine(); - OS << T; -} - bool LinePrinter::IsClassExcluded(const ClassLayout &Class) { if (IsTypeExcluded(Class.getName(), Class.getSize())) return true; @@ -93,19 +79,6 @@ bool LinePrinter::IsClassExcluded(const ClassLayout &Class) { return false; } -void LinePrinter::formatBinary(StringRef Label, ArrayRef<uint8_t> Data, - uint32_t StartOffset) { - NewLine(); - OS << Label << " ("; - if (!Data.empty()) { - OS << "\n"; - OS << format_bytes_with_ascii(Data, StartOffset, 32, 4, - CurrentIndent + IndentSpaces, true); - NewLine(); - } - OS << ")"; -} - bool LinePrinter::IsTypeExcluded(llvm::StringRef TypeName, uint32_t Size) { if (IsItemExcluded(TypeName, IncludeTypeFilters, ExcludeTypeFilters)) return true; |