summaryrefslogtreecommitdiffstats
path: root/llvm/utils/unittest/UnitTestMain/TestMain.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-04-07 20:43:23 +0000
committerPete Cooper <peter_cooper@apple.com>2015-04-07 20:43:23 +0000
commit6bea2f4f88ddc4437c4a072ca60118e7ad8ed834 (patch)
treee29d3564f9a5d904c6a9e7ff27e9a9c2940dfc40 /llvm/utils/unittest/UnitTestMain/TestMain.cpp
parent78aa3452f690cfa11ff49f9338f9a035335cf513 (diff)
downloadbcm5719-llvm-6bea2f4f88ddc4437c4a072ca60118e7ad8ed834.tar.gz
bcm5719-llvm-6bea2f4f88ddc4437c4a072ca60118e7ad8ed834.zip
Add boolean to PrintStackTraceOnErrorSignal to disable crash reporting.
The current crash reporting on Mac OS is only disabled via an environment variable. This adds a boolean (default false) which can also disable crash reporting. The only client right now is the unittests which don't ever want crash reporting, but do want to detect killed programs. Reduces the time to run the APFloat unittests on my machine from [----------] 47 tests from APFloatTest (51250 ms total) to [----------] 47 tests from APFloatTest (765 ms total) Reviewed by Reid Kleckner and Justin Bogner llvm-svn: 234353
Diffstat (limited to 'llvm/utils/unittest/UnitTestMain/TestMain.cpp')
-rw-r--r--llvm/utils/unittest/UnitTestMain/TestMain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/unittest/UnitTestMain/TestMain.cpp b/llvm/utils/unittest/UnitTestMain/TestMain.cpp
index 5387512e6fb..f5b09a5cf67 100644
--- a/llvm/utils/unittest/UnitTestMain/TestMain.cpp
+++ b/llvm/utils/unittest/UnitTestMain/TestMain.cpp
@@ -23,7 +23,7 @@
const char *TestMainArgv0;
int main(int argc, char **argv) {
- llvm::sys::PrintStackTraceOnErrorSignal();
+ llvm::sys::PrintStackTraceOnErrorSignal(true /* Disable crash reporting */);
testing::InitGoogleTest(&argc, argv);
llvm::cl::ParseCommandLineOptions(argc, argv);
OpenPOWER on IntegriCloud