diff options
| author | 2019-01-27 16:42:12 +0000 | |
|---|---|---|
| committer | 2019-01-27 16:42:12 +0000 | |
| commit | b773203fb58f3ef282fb69c832d8710cab5bc82d (patch) | |
| tree | e75913f147570fbd75169647b144df85b88a038c /gnu/llvm/tools/llvm-cov/llvm-cov.cpp | |
| parent | tweak errno in previous (diff) | |
| download | wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip | |
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/llvm-cov/llvm-cov.cpp')
| -rw-r--r-- | gnu/llvm/tools/llvm-cov/llvm-cov.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gnu/llvm/tools/llvm-cov/llvm-cov.cpp b/gnu/llvm/tools/llvm-cov/llvm-cov.cpp index 15841587025..4c3b574451c 100644 --- a/gnu/llvm/tools/llvm-cov/llvm-cov.cpp +++ b/gnu/llvm/tools/llvm-cov/llvm-cov.cpp @@ -14,32 +14,31 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/InitLLVM.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" -#include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Process.h" -#include "llvm/Support/Signals.h" #include "llvm/Support/raw_ostream.h" #include <string> using namespace llvm; -/// \brief The main entry point for the 'show' subcommand. +/// The main entry point for the 'show' subcommand. int showMain(int argc, const char *argv[]); -/// \brief The main entry point for the 'report' subcommand. +/// The main entry point for the 'report' subcommand. int reportMain(int argc, const char *argv[]); -/// \brief The main entry point for the 'export' subcommand. +/// The main entry point for the 'export' subcommand. int exportMain(int argc, const char *argv[]); -/// \brief The main entry point for the 'convert-for-testing' subcommand. +/// The main entry point for the 'convert-for-testing' subcommand. int convertForTestingMain(int argc, const char *argv[]); -/// \brief The main entry point for the gcov compatible coverage tool. +/// The main entry point for the gcov compatible coverage tool. int gcovMain(int argc, const char *argv[]); -/// \brief Top level help. +/// Top level help. static int helpMain(int argc, const char *argv[]) { errs() << "Usage: llvm-cov {export|gcov|report|show} [OPTION]...\n\n" << "Shows code coverage information.\n\n" @@ -52,17 +51,14 @@ static int helpMain(int argc, const char *argv[]) { return 0; } -/// \brief Top level version information. +/// Top level version information. static int versionMain(int argc, const char *argv[]) { cl::PrintVersionMessage(); return 0; } int main(int argc, const char **argv) { - // Print a stack trace if we signal out. - sys::PrintStackTraceOnErrorSignal(argv[0]); - PrettyStackTraceProgram X(argc, argv); - llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + InitLLVM X(argc, argv); // If argv[0] is or ends with 'gcov', always be gcov compatible if (sys::path::stem(argv[0]).endswith_lower("gcov")) |
