[TextAPI] TBD Reader/Writer
authorJuergen Ributzka <juergen@ributzka.de>
Fri, 22 Mar 2019 22:46:52 +0000 (22:46 +0000)
committerJuergen Ributzka <juergen@ributzka.de>
Fri, 22 Mar 2019 22:46:52 +0000 (22:46 +0000)
commit32cb594177df24e0a17e049848425dd2c54ba98b
treebf730a190b4645d35f4acd62805df98e19bb94cc
parent4f9cb26063aa58c17dc4ab7e13a17d44ca165ed3
[TextAPI] TBD Reader/Writer

Add basic infrastructure for reading and writting TBD files (version 1 - 3).

The TextAPI library is not used by anything yet (besides the unit tests). Tool
support will be added in a separate commit.

The TBD format is currently documented in the implementation file (TextStub.cpp).

https://reviews.llvm.org/D53945

Update: This contains changes to fix issues discovered by the bots:
 - add parentheses to silence warnings.
 - rename variables
 - use PlatformType from BinaryFormat
 - Trying if switching from a vector to an array will appeas the bots.
 - Replace the tuple with a struct to work around an explicit constructor bug.
 - This fixes an issue where we were leaking the YAML document if there was a
   parsing error.

Updated the license information in all files.

llvm-svn: 356820
21 files changed:
llvm/include/llvm/TextAPI/MachO/Architecture.def [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/Architecture.h [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/ArchitectureSet.h [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/InterfaceFile.h [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/PackedVersion.h [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/Symbol.h [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/TextAPIReader.h [new file with mode: 0644]
llvm/include/llvm/TextAPI/MachO/TextAPIWriter.h [new file with mode: 0644]
llvm/lib/TextAPI/CMakeLists.txt
llvm/lib/TextAPI/MachO/Architecture.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/ArchitectureSet.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/InterfaceFile.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/PackedVersion.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/Symbol.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/TextAPIContext.h [new file with mode: 0644]
llvm/lib/TextAPI/MachO/TextStub.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/TextStubCommon.cpp [new file with mode: 0644]
llvm/lib/TextAPI/MachO/TextStubCommon.h [new file with mode: 0644]
llvm/unittests/TextAPI/CMakeLists.txt
llvm/unittests/TextAPI/TextStubV1Tests.cpp [new file with mode: 0644]
llvm/unittests/TextAPI/TextStubV2Tests.cpp [new file with mode: 0644]