diff options
| author | Chris Bieneman <beanz@apple.com> | 2016-05-11 22:07:48 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2016-05-11 22:07:48 +0000 |
| commit | b83c187195ea8b0f6bd33f4209095304766756c5 (patch) | |
| tree | a65208bbff07e61ff53c54a555c64a0541873b76 /llvm/tools/yaml2obj/yaml2obj.cpp | |
| parent | 8cb136b8debe85547caa4b220438967fc313cfc3 (diff) | |
| download | bcm5719-llvm-b83c187195ea8b0f6bd33f4209095304766756c5.tar.gz bcm5719-llvm-b83c187195ea8b0f6bd33f4209095304766756c5.zip | |
Initial add for MachO support for yaml2obj
Adding the initial files for adding MachO support to yaml2obj. Passing a MachO file will result in an error.
I will be implementing obj2yaml and yaml2obj for MachO in parallel so that one can be used to test the other.
llvm-svn: 269244
Diffstat (limited to 'llvm/tools/yaml2obj/yaml2obj.cpp')
| -rw-r--r-- | llvm/tools/yaml2obj/yaml2obj.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/yaml2obj/yaml2obj.cpp b/llvm/tools/yaml2obj/yaml2obj.cpp index af4d8689067..cf1c82a26a9 100644 --- a/llvm/tools/yaml2obj/yaml2obj.cpp +++ b/llvm/tools/yaml2obj/yaml2obj.cpp @@ -42,7 +42,8 @@ static cl::opt<std::string> // library. enum YAMLObjectFormat { YOF_COFF, - YOF_ELF + YOF_ELF, + YOF_MACHO }; cl::opt<YAMLObjectFormat> Format( @@ -51,6 +52,7 @@ cl::opt<YAMLObjectFormat> Format( cl::values( clEnumValN(YOF_COFF, "coff", "COFF object file format"), clEnumValN(YOF_ELF, "elf", "ELF object file format"), + clEnumValN(YOF_MACHO, "macho", "Mach-O object file format"), clEnumValEnd)); cl::opt<unsigned> @@ -102,6 +104,8 @@ int main(int argc, char **argv) { Convert = yaml2coff; else if (Format == YOF_ELF) Convert = yaml2elf; + else if (Format == YOF_MACHO) + Convert = yaml2macho; else { errs() << "Not yet implemented\n"; return 1; |

