#include "clang/Tooling/Refactoring.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/YAMLTraits.h"
} // anonymous namespace
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
tooling::CommonOptionsParser OptionsParser(argc, argv,
ChangeNamespaceCategory);
const auto &Files = OptionsParser.getSourcePathList();
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
}
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
std::error_code OK;
ExecutorName.setInitialValue("all-TUs");
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signals.h"
} // namespace
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
tooling::CommonOptionsParser OptionsParser(argc, argv, ClangMoveCategory);
if (OldDependOnNew && NewDependOnOld) {
#include "clang/Tooling/Tooling.h"
#include "llvm/LineEditor/LineEditor.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Signals.h"
#include <fstream>
}
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
CommonOptionsParser OptionsParser(argc, argv, ClangQueryCategory);
#include "../ClangTidyForceLinker.h"
#include "../GlobList.h"
#include "clang/Tooling/CommonOptionsParser.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
}
static int clangTidyMain(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory,
cl::ZeroOrMore);
llvm::IntrusiveRefCntPtr<vfs::OverlayFileSystem> BaseFS(
#include "llvm/ADT/StringSwitch.h"
#include "llvm/LineEditor/LineEditor.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Signals.h"
namespace clang {
int main(int argc, const char *argv[]) {
using namespace clang::clangd;
- llvm::InitLLVM X(argc, argv);
llvm::cl::ParseCommandLineOptions(argc, argv, Overview);
llvm::cl::ResetCommandLineParser(); // We reuse it for REPL commands.
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
std::unique_ptr<SymbolIndex> Index;
reportTime("Dex build", [&]() {
#include "clang/Tooling/Execution.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Signals.h"
namespace clang {
} // namespace clang
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
const char *Overview = R"(
Creates an index of symbol information etc in a whole project.
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
using namespace clang;
using namespace clang::clangd;
- llvm::InitLLVM X(argc, argv);
llvm::InitializeAllTargetInfos();
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
llvm::cl::SetVersionPrinter([](llvm::raw_ostream &OS) {
OS << clang::getClangToolFullVersion("clangd") << "\n";
});
#include "clang/Tooling/Refactoring/AtomicChange.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Signals.h"
static cl::OptionCategory ToolTemplateCategory("tool-template options");
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
auto Executor = clang::tooling::createExecutorFromCommandLineArgs(
argc, argv, ToolTemplateCategory);
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Signals.h"
//===----------------------------------------------------------------------===//
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
void *MainAddr = (void*) (intptr_t) GetExecutablePath;
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
std::string
resourcesPath = CompilerInvocation::GetResourcesPath(argv[0], MainAddr);
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Frontend/FrontendAction.h"
-#include "clang/Index/IndexDataConsumer.h"
#include "clang/Index/IndexingAction.h"
+#include "clang/Index/IndexDataConsumer.h"
#include "clang/Index/USRGeneration.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Serialization/ASTReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InitLLVM.h"
-#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/PrettyStackTrace.h"
using namespace clang;
using namespace clang::index;
//===----------------------------------------------------------------------===//
int indextest_core_main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0]);
+ PrettyStackTraceProgram X(argc, argv);
void *MainAddr = (void*) (intptr_t) indextest_core_main;
std::string Executable = llvm::sys::fs::getMainExecutable(argv[0], MainAddr);
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Option/OptTable.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
} // namespace
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
// Initialize targets for clang module support.
llvm::InitializeAllTargets();
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Signals.h"
#include <sstream>
#include <string>
int main(int argc, const char **argv) {
// Print a stack trace if we signal out.
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0], false);
+ PrettyStackTraceProgram X(argc, argv);
const char *Overview = "\nThis tool collects the USR name and location "
"of external definitions in the source files "
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
}
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0]);
cl::HideUnrelatedOptions(ClangOffloadBundlerCategory);
cl::SetVersionPrinter(PrintVersion);
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/ToolOutputFile.h"
} // anonymous namespace
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0]);
cl::HideUnrelatedOptions(ClangOffloadWrapperCategory);
cl::SetVersionPrinter([](raw_ostream &OS) {
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
} // end anonymous namespace
int main(int argc, const char **argv) {
- llvm::InitLLVM X(argc, argv);
+ llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
ClangRefactorTool RefactorTool;
//
//===----------------------------------------------------------------------===//
-#include "ClangASTEmitters.h"
#include "TableGenBackends.h" // Declares all backends.
+#include "ClangASTEmitters.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/TableGen/Error.h"
}
int main(int argc, char **argv) {
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0]);
+ PrettyStackTraceProgram X(argc, argv);
cl::ParseCommandLineOptions(argc, argv);
llvm_shutdown_obj Y;
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.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"
int main(int argc, char **argv) {
// Print a stack trace if we signal out.
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0]);
+ PrettyStackTraceProgram X(argc, argv);
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
ToolName = argv[0];
#include "TableGenBackends.h" // Declares all backends.
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
}
int main(int argc, char **argv) {
- llvm::InitLLVM X(argc, argv);
+ sys::PrintStackTraceOnErrorSignal(argv[0]);
+ PrettyStackTraceProgram X(argc, argv);
cl::ParseCommandLineOptions(argc, argv);
llvm_shutdown_obj Y;