summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/TextAPI
Commit message (Collapse)AuthorAgeFilesLines
* Reland "[TextAPI] Introduce TBDv4"Cyndy Ishida2019-10-102-0/+565
| | | | | | | | | Original Patch broke for compilations w/ gcc and exposed asan fail. This reland repairs those bugs. Differential Revision: https://reviews.llvm.org/D67529 llvm-svn: 374277
* Revert [TextAPI] Introduce TBDv4Cyndy Ishida2019-10-082-559/+0
| | | | | | This reverts r374058 (git commit 5d566c5a46aeaa1fa0e5c0b823c9d5f84036dc9a) llvm-svn: 374062
* [TextAPI] Introduce TBDv4Cyndy Ishida2019-10-082-0/+559
| | | | | | | | | | | | | | | | | | | Summary: This format introduces new features and platforms The motivation for this format is to support more than 1 platform since previous versions only supported additional architectures and 1 platform, for example ios + ios-simulator and macCatalyst. Reviewers: ributzka, steven_wu Reviewed By: ributzka Subscribers: mgorny, hiraditya, mgrang, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67529 llvm-svn: 374058
* [TextAPI] Add New Supported PlatformsCyndy Ishida2019-09-232-0/+54
| | | | | | | | | | | | | | | | Summary: This patch introduces simulators, as well was the restriced zippered and macCatalyst to supported platforms Reviewers: ributzka, steven_wu Reviewed By: ributzka Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67528 llvm-svn: 372618
* [TextAPI] Arch&Platform to TargetCyndy Ishida2019-09-203-64/+130
| | | | | | | | | | | | | | | | | | | | Summary: This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform. This is because in previous versions tbd files only supported a single platform but that is no longer the case, so, now its tracked by unique triples. This precedes a seperate patch that will add the TBD-v4 format Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai Reviewed By: ributzka Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67527 llvm-svn: 372396
* [TextAPI] Update reader to be supported by lib/ObjectCyndy Ishida2019-08-163-115/+98
| | | | | | | | | | | | | | | | | | | Summary: To be able to use the TextAPI/Reader for tbd file consumption (by libObject) it gets passed a MemoryBufferRef which isn't castable to MemoryBuffer. Updated the tests to expect that input as well. Reviewers: ributzka, steven_wu Reviewed By: steven_wu Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66147 llvm-svn: 369119
* [TextAPI] Fix & Add tests for tbd files version 3.Juergen Ributzka2019-08-122-1/+438
| | | | | | | | | | | | - There was a simple typo in TextStub code that prevented version 3 files to be read. - Included a version 3 unit test to handle the differences in the format. - Also a typo in Error.h inside the comments. https://reviews.llvm.org/D66041 This patch is from Cyndy Ishida <cyndy_ishida@apple.com>. llvm-svn: 368630
* Revert "Disable MachO TBD write tests for Windows."Juergen Ributzka2019-08-122-6/+0
| | | | | | The underlying issue was fixed in r357759. llvm-svn: 368611
* [YAMLIO] Remove trailing spaces when outputting mapsFangrui Song2019-07-123-4/+4
| | | | | | | | | | | | | | | | | | llvm::yaml::Output::paddedKey unconditionally outputs spaces, which are superfluous if the value to be dumped is a sequence or map. Change `bool NeedsNewLine` to `StringRef Padding` so that it can be overridden to `\n` if the value is a sequence or map. An empty map/sequence is special. It is printed as `{}` or `[]` without a newline, while a non-empty map/sequence follows a newline. To handle this distinction, add another variable `PaddingBeforeContainer` and does the special handling in endMapping/endSequence. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D64566 llvm-svn: 365869
* [TextAPI] Prefix all architecture enums to fix the build on i386.Juergen Ributzka2019-04-042-28/+22
| | | | | | | | | | | | | | | | | Summary: This changes the Architecture enum to use a prefix (AK_) to prevent the preprocessor from replacing i386 with 1 when building llvm/clang for i386. Reviewers: steven_wu, lhames, mstorsjo Reviewed By: mstorsjo Subscribers: hiraditya, jkorous, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60241 llvm-svn: 357733
* Disable MachO TBD write tests for Windows.Juergen Ributzka2019-03-232-0/+6
| | | | | | | The tests are failing on the windows bots. I am disabling them for now. This is a followup to r356820. llvm-svn: 356826
* [TextAPI] TBD Reader/WriterJuergen Ributzka2019-03-223-1/+940
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Rename TapiTests to TextAPITestsNico Weber2019-01-031-2/+2
| | | | | | | | | This makes the target name consistent with how all the other unit tests are named. Differential Revision: https://reviews.llvm.org/D56216 llvm-svn: 350339
* [TextAPI][elfabi] Fix failing tests from D56020Armando Montanez2018-12-211-0/+2
| | | | llvm-svn: 349963
* [TextAPI][elfabi] Fix YAML support for weak symbolsArmando Montanez2018-12-211-1/+16
| | | | | | | | | | | Weak symbols are supposed to be supported in the ELF TextAPI implementation, but the YAML handler didn't read or write the `Weak` member of ELFSymbol. This change adds the YAML mapping and updates tests to ensure correct behavior. Differential Revision: https://reviews.llvm.org/D56020 llvm-svn: 349950
* [TextAPI][elfabi] Make SoName optionalArmando Montanez2018-12-111-4/+3
| | | | | | | | | | | This change makes DT_SONAME treated as an optional trait for ELF TextAPI stubs. This change accounts for the fact that shared objects aren't guaranteed to have a DT_SONAME entry. Tests have been updated to check for correct behavior of an optional soname. Differential Revision: https://reviews.llvm.org/D55533 llvm-svn: 348817
* Fix LLVM_LINK_LLVM_DYLIB build of TapiTestsSam Clegg2018-12-101-1/+2
| | | | | | | | | A dependency on TestingSupport was introduced in rL348735 but library was not incldued in the LLVM_LINK_LLVM_DYLIB build. Differential Revision: https://reviews.llvm.org/D55526 llvm-svn: 348803
* [TextAPI][elfabi] Make TBE handlers functions that return ErrorsArmando Montanez2018-12-102-23/+17
| | | | | | | | | | | | Since TBEHandler doesn't maintain state or otherwise have any need to be a class right now, the read and write functions have been moved out and turned into standalone functions. Additionally, the TBE read function has been updated to return an Expected value for better error handling. Tests have been updated to reflect these changes. Differential Revision: https://reviews.llvm.org/D55450 llvm-svn: 348735
* [llvm-tapi] Don't try to override SequenceTraits for std::stringSam Clegg2018-12-071-1/+4
| | | | | | | | | | | | | | | | For some reason this doesn't seem to work with LLVM_LINK_LLVM_DYLIB build. See https://logs.chromium.org/logs/chromium/bb/client.wasm.llvm/linux/37764/+/recipes/steps/LLVM_regression_tests/0/stdout What is more it seems that overriding these traits for core types (including std::string) is not supported/recommend by YAMLTraits.h. See line 1918 which has the assertion: "only use LLVM_YAML_IS_SEQUENCE_VECTOR for types you control" Differential Revision: https://reviews.llvm.org/D55381 llvm-svn: 348630
* [llvm-tapi] initial commit, supports ELF text stubsArmando Montanez2018-12-032-0/+223
| | | | | | | | | | | | | | | | | | | http://lists.llvm.org/pipermail/llvm-dev/2018-September/126472.html TextAPI is a library and accompanying tool that allows conversion between binary shared object stubs and textual counterparts. The motivations and uses cases for this are explained thoroughly in the llvm-dev proposal [1]. This initial commit proposes a potential structure for the TAPI library, also including support for reading/writing text-based ELF stubs (.tbe) in addition to preliminary support for reading binary ELF files. The goal for this patch is to ensure the project architecture appropriately welcomes integration of Mach-O stubbing from Apple's TAPI [2]. Added: - TextAPI library - .tbe read support - .tbe write (to raw_ostream) support [1] http://lists.llvm.org/pipermail/llvm-dev/2018-September/126472.html [2] https://github.com/ributzka/tapi Differential Revision: https://reviews.llvm.org/D53051 llvm-svn: 348170
* Revert r347823 "[TextAPI] Switch back to a custom Platform enum."Hans Wennborg2018-11-293-945/+0
| | | | | | | | | It broke the Windows buildbots, e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/21829/steps/test/logs/stdio This also reverts the follow-ups: r347824, r347827, and r347836. llvm-svn: 347874
* [TextAPI] Switch back to a custom Platform enum.Juergen Ributzka2018-11-292-16/+16
| | | | | | | | | Moving to PlatformType from BinaryFormat had some UB fallout when handing unknown platforms or malformed input files. This should fix the sanitizer bots. llvm-svn: 347836
* [TextAPI] TBD Reader/Writer (bot fixes: take 2)Juergen Ributzka2018-11-292-8/+30
| | | | | | Replace the tuple with a struct to work around an explicit constructor bug. llvm-svn: 347827
* [TextAPI] TBD Reader/Writer (bot fixes)Juergen Ributzka2018-11-292-8/+10
| | | | | | Trying if switching from a vector to an array will appeas the bots. llvm-svn: 347824
* [TextAPI] TBD Reader/WriterJuergen Ributzka2018-11-293-0/+921
| | | | | | | | | | | | | | | | | 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 llvm-svn: 347823
* Revert "[TextAPI] TBD Reader/Writer"Juergen Ributzka2018-11-283-921/+0
| | | | | | Reverting to unbreak bots. llvm-svn: 347809
* [TextAPI] TBD Reader/WriterJuergen Ributzka2018-11-283-0/+921
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 llvm-svn: 347808
OpenPOWER on IntegriCloud