From 8cb136b8debe85547caa4b220438967fc313cfc3 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 11 May 2016 22:07:45 +0000 Subject: Initial add for MachO support for obj2yaml Adding the initial files for adding MachO support to obj2yaml. Passing a MachO file will result in a new not_implemented error. I will be implementing obj2yaml and yaml2obj for MachO in parallel so that one can be used to test the other. llvm-svn: 269243 --- llvm/tools/obj2yaml/obj2yaml.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/tools/obj2yaml/obj2yaml.cpp') diff --git a/llvm/tools/obj2yaml/obj2yaml.cpp b/llvm/tools/obj2yaml/obj2yaml.cpp index 8c4e1f814c4..62f2f796915 100644 --- a/llvm/tools/obj2yaml/obj2yaml.cpp +++ b/llvm/tools/obj2yaml/obj2yaml.cpp @@ -24,6 +24,8 @@ static std::error_code dumpObject(const ObjectFile &Obj) { return coff2yaml(outs(), cast(Obj)); if (Obj.isELF()) return elf2yaml(outs(), Obj); + if (Obj.isMachO() || Obj.isMachOUniversalBinary()) + return macho2yaml(outs(), Obj); return obj2yaml_error::unsupported_obj_file_format; } -- cgit v1.2.3