summaryrefslogtreecommitdiff
path: root/bolt/unittests
diff options
context:
space:
mode:
authorVladislav Khmelevsky <och95@yandex.ru>2022-01-26 23:45:46 +0300
committerVladislav Khmelevsky <och95@yandex.ru>2022-01-27 00:22:13 +0300
commit20e9d4caf0cb37188bd218730f781728fe779c50 (patch)
tree122375554135a8a57e0e2d17ed49d530d2994e7b /bolt/unittests
parent0606817d0b02321eaaf905e9c8246c63a1c0482f (diff)
downloadllvm-20e9d4caf0cb37188bd218730f781728fe779c50.tar.gz
[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
Diffstat (limited to 'bolt/unittests')
-rw-r--r--bolt/unittests/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/bolt/unittests/CMakeLists.txt b/bolt/unittests/CMakeLists.txt
new file mode 100644
index 000000000000..5b0f75d1c88c
--- /dev/null
+++ b/bolt/unittests/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_custom_target(BoltUnitTests)
+set_target_properties(BoltUnitTests PROPERTIES FOLDER "BOLT tests")
+
+function(add_bolt_unittest test_dirname)
+ add_unittest(BoltUnitTests ${test_dirname} ${ARGN})
+endfunction()