Commit 668e33c6 authored by Andrés Villegas's avatar Andrés Villegas
Browse files

[dwp][libtool-darwin][sancov] Enable llvm-driver

Enable llvm-driver for:
llvm-dwp
llvm-libtoo-darwin
sancov

Differential Revision: https://reviews.llvm.org/D156758
parent 2734f154
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ add_llvm_tool(llvm-dwp
  DEPENDS
  intrinsics_gen
  DwpOptsTableGen
  GENERATE_DRIVER
  )

if(LLVM_INSTALL_BINUTILS_SYMLINKS)
+2 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/ToolOutputFile.h"
@@ -125,7 +126,7 @@ static Expected<Triple> readTargetTriple(StringRef FileName) {
  return ErrOrObj->getBinary()->makeTriple();
}

int main(int argc, char **argv) {
int llvm_dwp_main(int argc, char **argv, const llvm::ToolContext &) {
  InitLLVM X(argc, argv);

  DwpOptTable Tbl;
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ add_llvm_tool(llvm-libtool-darwin

  DEPENDS
  LibtoolDarwinOptsTableGen
  GENERATE_DRIVER
)

if(LLVM_INSTALL_CCTOOLS_SYMLINKS)
+4 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/VirtualFileSystem.h"
@@ -31,6 +32,7 @@
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/Architecture.h"
#include <cstdlib>
#include <map>
#include <type_traits>

@@ -733,7 +735,7 @@ static Expected<Config> parseCommandLine(int Argc, char **Argv) {
  return C;
}

int main(int Argc, char **Argv) {
int llvm_libtool_darwin_main(int Argc, char **Argv, const llvm::ToolContext &) {
  InitLLVM X(Argc, Argv);
  Expected<Config> ConfigOrErr = parseCommandLine(Argc, Argv);
  if (!ConfigOrErr) {
@@ -760,4 +762,5 @@ int main(int Argc, char **Argv) {
    }
    break;
  }
  return EXIT_SUCCESS;
}
+1 −0
Original line number Diff line number Diff line
@@ -20,4 +20,5 @@ add_llvm_tool(sancov

  DEPENDS
  SancovOptsTableGen
  GENERATE_DRIVER
  )
Loading