diff --git a/llvm/tools/llvm-cgdata/CMakeLists.txt b/llvm/tools/llvm-cgdata/CMakeLists.txt index 4f1f7ff635bc3..966384278b9ab 100644 --- a/llvm/tools/llvm-cgdata/CMakeLists.txt +++ b/llvm/tools/llvm-cgdata/CMakeLists.txt @@ -11,5 +11,4 @@ add_llvm_tool(llvm-cgdata DEPENDS intrinsics_gen - GENERATE_DRIVER ) diff --git a/llvm/tools/llvm-cgdata/llvm-cgdata.cpp b/llvm/tools/llvm-cgdata/llvm-cgdata.cpp index 3303ffd9d863b..4ad0357b95d86 100644 --- a/llvm/tools/llvm-cgdata/llvm-cgdata.cpp +++ b/llvm/tools/llvm-cgdata/llvm-cgdata.cpp @@ -18,7 +18,7 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/Object/Archive.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/LLVMDriver.h" +#include "llvm/Support/InitLLVM.h" #include "llvm/Support/Path.h" #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/WithColor.h" @@ -240,8 +240,8 @@ static int show_main(int argc, const char *argv[]) { return 0; } -int llvm_cgdata_main(int argc, char **argvNonConst, const llvm::ToolContext &) { - const char **argv = const_cast(argvNonConst); +int main(int argc, const char **argv) { + llvm::InitLLVM X(argc, argv); StringRef ProgName(sys::path::filename(argv[0]));