summaryrefslogtreecommitdiff
path: root/bolt/tools
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/tools
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/tools')
-rw-r--r--bolt/tools/driver/llvm-bolt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/bolt/tools/driver/llvm-bolt.cpp b/bolt/tools/driver/llvm-bolt.cpp
index 30d6cf820ac1..717f2762809a 100644
--- a/bolt/tools/driver/llvm-bolt.cpp
+++ b/bolt/tools/driver/llvm-bolt.cpp
@@ -45,6 +45,11 @@ static cl::OptionCategory *BoltDiffCategories[] = {&BoltDiffCategory};
static cl::OptionCategory *Perf2BoltCategories[] = {&AggregatorCategory,
&BoltOutputCategory};
+static cl::opt<std::string> InputFilename(cl::Positional,
+ cl::desc("<executable>"),
+ cl::Required, cl::cat(BoltCategory),
+ cl::sub(*cl::AllSubCommands));
+
static cl::opt<std::string>
InputDataFilename("data",
cl::desc("<data file>"),