From 5d910222bf780fe7e57b2aa65db29f182fe3336e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 19 Oct 2021 20:30:53 +0900 Subject: [PATCH] [Mach-O] wip --- macho/tapi.cc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/macho/tapi.cc b/macho/tapi.cc index 8ffe766b..beeaecab 100644 --- a/macho/tapi.cc +++ b/macho/tapi.cc @@ -7,30 +7,6 @@ namespace mold::macho { typedef std::unordered_map YamlMap; typedef std::vector YamlVector; -static void dump_yaml(Context &ctx, YamlNode &node, i64 depth = 0) { - if (auto *elem = std::get_if(&node.data)) { - SyncOut(ctx) << std::string(depth * 2, ' ') << '"' << *elem << '"'; - return; - } - - if (auto *elem = std::get_if(&node.data)) { - SyncOut(ctx) << std::string(depth * 2, ' ') << "vector:"; - for (YamlNode &child : *elem) - dump_yaml(ctx, child, depth + 1); - return; - } - - auto *elem = - std::get_if>(&node.data); - assert(elem); - - SyncOut(ctx) << std::string(depth * 2, ' ') << "map:"; - for (std::pair &kv : *elem) { - SyncOut(ctx) << std::string(depth * 2 + 2, ' ') << "key: " << kv.first; - dump_yaml(ctx, kv.second, depth + 1); - } -} - static std::string_view get_line(std::string_view str, i64 pos) { i64 begin = str.substr(0, pos).rfind('\n'); if (begin == str.npos)