summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorCyndy Ishida <cyndy_ishida@apple.com>2019-08-21 21:00:16 +0000
committerCyndy Ishida <cyndy_ishida@apple.com>2019-08-21 21:00:16 +0000
commit359840a6e4ae062f984c2ce91ab37c084755c158 (patch)
tree9e951545fa9aa5abfee440b2c4317e6ec1c08351 /llvm/lib/Object/ObjectFile.cpp
parent08ff5df49c61a4d6bd297ac34c5b7815bcc83624 (diff)
downloadbcm5719-llvm-359840a6e4ae062f984c2ce91ab37c084755c158.tar.gz
bcm5719-llvm-359840a6e4ae062f984c2ce91ab37c084755c158.zip
[BinaryFormat] Teach identify_magic about Tapi files.
Summary: Tapi files are YAML files that start with the !tapi tag. The only execption are TBD v1 files, which don't have a tag. In that case we have to scan a little further and check if the first key "archs" exists. This is the first patch in a series of patches to add libObject support for text-based dynamic library (.tbd) files. This patch is practically exactly the same as D37820, that was never pushed to master, and is needed for future commits related to reading tbd files for llvm-nm Reviewers: ributzka, steven_wu, bollu, espindola, jfb, shafik, jdoerfert Reviewed By: steven_wu Subscribers: dexonsmith, llvm-commits Tags: #llvm, #clang, #sanitizers, #lldb, #libc, #openmp Differential Revision: https://reviews.llvm.org/D66149 llvm-svn: 369579
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ObjectFile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 101f5dcc082..79812e3a10b 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -127,6 +127,8 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type) {
case file_magic::pdb:
case file_magic::minidump:
return errorCodeToError(object_error::invalid_file_type);
+ case file_magic::tapi_file:
+ return errorCodeToError(object_error::invalid_file_type);
case file_magic::elf:
case file_magic::elf_relocatable:
case file_magic::elf_executable:
OpenPOWER on IntegriCloud