From c20d1f90b53ae53aee3cac86a84e79d596b5711e Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 21 Aug 2019 23:30:53 +0000 Subject: [Object] Add tapi files to object Summary: The intention for this is to allow reading and printing symbols out from llvm-nm. Tapi file, and Tapi universal follow a similiar format to their respective MachO Object format. The tests are dependent on llvm-nm processing tbd files which is why its in D66160 Reviewers: ributzka, steven_wu, lhames Reviewed By: ributzka, lhames Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66159 llvm-svn: 369600 --- llvm/lib/Object/Binary.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Object/Binary.cpp') diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp index 1ceda54a4b4..944d2bc1bca 100644 --- a/llvm/lib/Object/Binary.cpp +++ b/llvm/lib/Object/Binary.cpp @@ -18,6 +18,7 @@ #include "llvm/Object/MachOUniversal.h" #include "llvm/Object/Minidump.h" #include "llvm/Object/ObjectFile.h" +#include "llvm/Object/TapiUniversal.h" #include "llvm/Object/WindowsResource.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" @@ -87,8 +88,7 @@ Expected> object::createBinary(MemoryBufferRef Buffer, case file_magic::minidump: return MinidumpFile::create(Buffer); case file_magic::tapi_file: - // Placeholder until TAPI is supported for lib/Object - return errorCodeToError(object_error::invalid_file_type); + return TapiUniversal::create(Buffer); } llvm_unreachable("Unexpected Binary File Type"); } -- cgit v1.2.3