[llvm] 3f52eef - [llvm-driver] Remove llvm-profdata from the driver (#162191)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 20:59:31 PDT 2025
Author: Prabhu Rajasekaran
Date: 2025-10-06T20:59:26-07:00
New Revision: 3f52eefcc228465c6cd58e25aff0f20a175ac8e0
URL: https://github.com/llvm/llvm-project/commit/3f52eefcc228465c6cd58e25aff0f20a175ac8e0
DIFF: https://github.com/llvm/llvm-project/commit/3f52eefcc228465c6cd58e25aff0f20a175ac8e0.diff
LOG: [llvm-driver] Remove llvm-profdata from the driver (#162191)
llvm-profdata uses cl tool for command line parsing which declares
global options which clash in a multicall driver build. As a result
operations such as `llvm-profdata --help` prints options which are
unrelated to llvm-profdata when built in multicall mode.
Added:
Modified:
llvm/tools/llvm-profdata/CMakeLists.txt
llvm/tools/llvm-profdata/llvm-profdata.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-profdata/CMakeLists.txt b/llvm/tools/llvm-profdata/CMakeLists.txt
index 165be9a2ea31b..e5aa858f3d39c 100644
--- a/llvm/tools/llvm-profdata/CMakeLists.txt
+++ b/llvm/tools/llvm-profdata/CMakeLists.txt
@@ -10,9 +10,6 @@ add_llvm_tool(llvm-profdata
DEPENDS
intrinsics_gen
- GENERATE_DRIVER
)
-if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
- target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod)
-endif()
+target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod)
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index d658ea99ab1b9..15ddb05f953ee 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -3464,10 +3464,7 @@ static int order_main() {
return 0;
}
-int llvm_profdata_main(int argc, char **argvNonConst,
- const llvm::ToolContext &) {
- const char **argv = const_cast<const char **>(argvNonConst);
-
+int main(int argc, const char *argv[]) {
StringRef ProgName(sys::path::filename(argv[0]));
if (argc < 2) {
More information about the llvm-commits
mailing list