[BOLT] Prepare BOLT for unit-testing
authorVladislav Khmelevsky <och95@yandex.ru>
Wed, 26 Jan 2022 20:45:46 +0000 (23:45 +0300)
committerVladislav Khmelevsky <och95@yandex.ru>
Wed, 26 Jan 2022 21:22:13 +0000 (00:22 +0300)
commit20e9d4caf0cb37188bd218730f781728fe779c50
tree122375554135a8a57e0e2d17ed49d530d2994e7b
parent0606817d0b02321eaaf905e9c8246c63a1c0482f
[BOLT] Prepare BOLT for unit-testing

This patch adds unit testing support for BOLT. In order to do this we will need at least do this changes on the code level:
* Make createMCPlusBuilder accessible externally
* Remove positional InputFilename argument to bolt utlity sources
And prepare the cmake and lit for the new tests.

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

Reviewed By: maksfb, Amir

Differential Revision: https://reviews.llvm.org/D118271
12 files changed:
bolt/CMakeLists.txt
bolt/include/bolt/Core/MCPlusBuilder.h
bolt/include/bolt/Rewrite/RewriteInstance.h
bolt/include/bolt/Utils/CommandLineOpts.h
bolt/lib/Rewrite/RewriteInstance.cpp
bolt/lib/Utils/CommandLineOpts.cpp
bolt/test/CMakeLists.txt
bolt/test/Unit/CMakeLists.txt [new file with mode: 0644]
bolt/test/Unit/lit.cfg.py [new file with mode: 0644]
bolt/test/Unit/lit.site.cfg.py.in [new file with mode: 0644]
bolt/tools/driver/llvm-bolt.cpp
bolt/unittests/CMakeLists.txt [new file with mode: 0644]