Set error message for where to report bugs (#11602)
Avoids recommending filing bugs with LLVM project for IREE project tooling.
diff --git a/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp b/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp
index 1d4602d..2c3a06c 100644
--- a/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp
+++ b/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp
@@ -18,6 +18,9 @@
#include "mlir/Tools/mlir-opt/MlirOptMain.h"
int ireeOptRunMain(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM y(argc, argv);
mlir::DialectRegistry registry;
diff --git a/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp b/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp
index 37521ab..4e5b645 100644
--- a/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp
+++ b/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp
@@ -69,6 +69,9 @@
}
int ireeCompilerRunLldMain(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
InitLLVM x(argc, argv);
sys::Process::UseANSIEscapeCodes(true);
bool exitEarly = true;
diff --git a/compiler/src/iree/compiler/Tools/iree_compile_lib.cc b/compiler/src/iree/compiler/Tools/iree_compile_lib.cc
index 37884b3..220ae7a 100644
--- a/compiler/src/iree/compiler/Tools/iree_compile_lib.cc
+++ b/compiler/src/iree/compiler/Tools/iree_compile_lib.cc
@@ -49,6 +49,9 @@
} // namespace mlir
int mlir::iree_compiler::runIreecMain(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM y(argc, argv);
static llvm::cl::OptionCategory mainOptions("IREE Main Options");
ireeCompilerGlobalInitialize(/*initializeCommandLine=*/true);
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp
index 6962815..235a1e4 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp
@@ -129,6 +129,9 @@
int main(int argc, char **argv) {
tensorflow::InitMlir y(&argc, &argv);
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
static cl::opt<std::string> inputPath(
cl::Positional, cl::desc("<saved model directory>"), cl::Required);
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
index 664cf37..a17238a 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
@@ -36,6 +36,9 @@
};
int main(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM y(argc, argv);
static cl::opt<std::string> inputPath(
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
index a7da555..5f57245 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
@@ -103,6 +103,9 @@
} // namespace
int main(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM y(argc, argv);
static cl::opt<std::string> inputPath(
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp
index 044ebdb..d1248b4 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp
@@ -23,6 +23,9 @@
#include "tensorflow/compiler/mlir/tosa/transforms/passes.h"
int main(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM y(argc, argv);
mlir::DialectRegistry registry;
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp
index 5fd5a04..5da1227 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp
@@ -27,6 +27,9 @@
#include "tensorflow/compiler/mlir/tosa/transforms/passes.h"
int main(int argc, char **argv) {
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM y(argc, argv);
mlir::DialectRegistry registry;
diff --git a/tools/iree-run-mlir-main.cc b/tools/iree-run-mlir-main.cc
index bc46dd9..ba7ffee 100644
--- a/tools/iree-run-mlir-main.cc
+++ b/tools/iree-run-mlir-main.cc
@@ -573,6 +573,9 @@
// On Windows InitLLVM re-queries the command line from Windows directly and
// totally messes up the array.
+ llvm::setBugReportMsg(
+ "Please report issues to https://github.com/iree-org/iree/issues and "
+ "include the crash backtrace.\n");
llvm::InitLLVM init_llvm(argc_llvm, argv_llvm);
llvm::cl::ParseCommandLineOptions(argc_llvm, argv_llvm);