InitLLVM already initializes PrettyStackTraceProgram
Remove extra PrettyStackTraceProgram and use InitLLVM consistently. PiperOrigin-RevId: 264041205
This commit is contained in:
parent
f81d84e452
commit
4ca0fd8d36
2
third_party/mlir/lib/Support/JitRunner.cpp
vendored
2
third_party/mlir/lib/Support/JitRunner.cpp
vendored
@ -48,7 +48,6 @@
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/FileUtilities.h"
|
||||
#include "llvm/Support/InitLLVM.h"
|
||||
#include "llvm/Support/PrettyStackTrace.h"
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
#include "llvm/Support/StringSaver.h"
|
||||
#include "llvm/Support/TargetSelect.h"
|
||||
@ -263,7 +262,6 @@ static Error compileAndExecuteSingleFloatReturnFunction(
|
||||
int mlir::JitRunnerMain(
|
||||
int argc, char **argv,
|
||||
llvm::function_ref<LogicalResult(mlir::ModuleOp)> mlirTransformer) {
|
||||
llvm::PrettyStackTraceProgram x(argc, argv);
|
||||
llvm::InitLLVM y(argc, argv);
|
||||
|
||||
initializeLLVM();
|
||||
|
2
third_party/mlir/tools/mlir-opt/mlir-opt.cpp
vendored
2
third_party/mlir/tools/mlir-opt/mlir-opt.cpp
vendored
@ -26,7 +26,6 @@
|
||||
#include "mlir/Support/MlirOptMain.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/InitLLVM.h"
|
||||
#include "llvm/Support/PrettyStackTrace.h"
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
#include "llvm/Support/ToolOutputFile.h"
|
||||
|
||||
@ -60,7 +59,6 @@ static cl::opt<bool>
|
||||
static std::vector<const PassRegistryEntry *> *passList;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
llvm::PrettyStackTraceProgram x(argc, argv);
|
||||
InitLLVM y(argc, argv);
|
||||
|
||||
// Register any pass manager command line options.
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/FormatVariadic.h"
|
||||
#include "llvm/Support/InitLLVM.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/PrettyStackTrace.h"
|
||||
#include "llvm/Support/Signals.h"
|
||||
#include "llvm/TableGen/Error.h"
|
||||
#include "llvm/TableGen/Main.h"
|
||||
@ -79,13 +79,11 @@ static bool MlirTableGenMain(raw_ostream &os, RecordKeeper &records) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
sys::PrintStackTraceOnErrorSignal(argv[0]);
|
||||
PrettyStackTraceProgram X(argc, argv);
|
||||
llvm::InitLLVM y(argc, argv);
|
||||
llvm::cl::opt<const mlir::GenInfo *, false, mlir::GenNameParser> generator(
|
||||
"", llvm::cl::desc("Generator to run"));
|
||||
cl::ParseCommandLineOptions(argc, argv);
|
||||
::generator = generator.getValue();
|
||||
|
||||
llvm_shutdown_obj Y;
|
||||
return TableGenMain(argv[0], &MlirTableGenMain);
|
||||
}
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "mlir/Support/LogicalResult.h"
|
||||
#include "mlir/Support/TranslateClParser.h"
|
||||
#include "llvm/Support/InitLLVM.h"
|
||||
#include "llvm/Support/PrettyStackTrace.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
||||
@ -37,7 +36,6 @@ static llvm::cl::opt<std::string>
|
||||
llvm::cl::value_desc("filename"), llvm::cl::init("-"));
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
llvm::PrettyStackTraceProgram x(argc, argv);
|
||||
llvm::InitLLVM y(argc, argv);
|
||||
|
||||
// Add flags for all the registered translations.
|
||||
|
Loading…
x
Reference in New Issue
Block a user