Skip to content

Commit 7f3dcf4

Browse files
authored
[ctx_prof] Don't use GENERATE_DRIVER (#100777)
1 parent d3fd28a commit 7f3dcf4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/tools/llvm-ctxprof-util/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ llvm-ctxprof-util.cpp
1010

1111
DEPENDS
1212
intrinsics_gen
13-
GENERATE_DRIVER
1413
)

llvm/tools/llvm-ctxprof-util/llvm-ctxprof-util.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include "llvm/Support/CommandLine.h"
2020
#include "llvm/Support/Error.h"
2121
#include "llvm/Support/ErrorHandling.h"
22+
#include "llvm/Support/InitLLVM.h"
2223
#include "llvm/Support/JSON.h"
23-
#include "llvm/Support/LLVMDriver.h"
2424
#include "llvm/Support/MemoryBuffer.h"
2525
#include "llvm/Support/raw_ostream.h"
2626

@@ -132,7 +132,7 @@ Error convertFromJSON() {
132132
return Error::success();
133133
}
134134

135-
int llvm_ctxprof_util_main(int argc, char **argv, const llvm::ToolContext &) {
135+
int main(int argc, const char **argv) {
136136
cl::ParseCommandLineOptions(argc, argv, "LLVM Contextual Profile Utils\n");
137137
ExitOnError ExitOnErr("llvm-ctxprof-util: ");
138138
if (FromJSON) {
@@ -145,6 +145,6 @@ int llvm_ctxprof_util_main(int argc, char **argv, const llvm::ToolContext &) {
145145
}
146146
return 0;
147147
}
148-
llvm_unreachable("Unknown subcommands should have been handled by the "
149-
"command line parser.");
148+
cl::PrintHelpMessage();
149+
return 1;
150150
}

0 commit comments

Comments
 (0)