Add support for exporting to tsv, in addtion to csv
Helpful when symbols can contain commas.
diff --git a/src/bloaty.h b/src/bloaty.h
index e202d8a..856b61d 100644
--- a/src/bloaty.h
+++ b/src/bloaty.h
@@ -467,7 +467,10 @@
PrettyPrint(options.max_label_len, out);
break;
case bloaty::OutputFormat::kCSV:
- PrintToCSV(out);
+ PrintToCSV(out, /*tabs=*/false);
+ break;
+ case bloaty::OutputFormat::kTSV:
+ PrintToCSV(out, /*tabs=*/true);
break;
case bloaty::OutputFormat::kTSV:
PrintToCSV(out, /*tabs=*/true);
@@ -504,7 +507,7 @@
bool diff_mode_ = false;
void PrettyPrint(size_t max_label_len, std::ostream* out) const;
- void PrintToCSV(std::ostream* out, bool tabs=false) const;
+ void PrintToCSV(std::ostream* out, bool tabs) const;
size_t CalculateLongestLabel(const RollupRow& row, int indent) const;
void PrettyPrintRow(const RollupRow& row, size_t indent, size_t longest_row,
std::ostream* out) const;
@@ -512,10 +515,10 @@
std::ostream* out) const;
void PrintRowToCSV(const RollupRow& row,
std::vector<std::string> parent_labels,
- std::ostream* out, bool tabs=false) const;
+ std::ostream* out, bool tabs) const;
void PrintTreeToCSV(const RollupRow& row,
std::vector<std::string> parent_labels,
- std::ostream* out, bool tabs=false) const;
+ std::ostream* out, bool tabs) const;
};
bool ParseOptions(bool skip_unknown, int* argc, char** argv[], Options* options,