aboutsummaryrefslogtreecommitdiff
path: root/utils/unittest
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
commitbf36adeed4aa5f41266ce0073cb8224448ae264d (patch)
tree6ecf8b5eaae82309a8bae27c294a5693547d4e25 /utils/unittest
parent696a3454def0003909964845f1f2789e05503d73 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/unittest')
-rw-r--r--utils/unittest/UnitTestMain/TestMain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/unittest/UnitTestMain/TestMain.cpp b/utils/unittest/UnitTestMain/TestMain.cpp
index 5387512e6fb..f5b09a5cf67 100644
--- a/utils/unittest/UnitTestMain/TestMain.cpp
+++ b/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);