[UBSan] Do not overwrite the default print_summary sanitizer option.

Summary:
This option is true by default in sanitizer common. The default
false value was added a while ago without any reasoning in
https://github.com/llvm-mirror/compiler-rt/commit/524e934112a593ac081bf2b05aa0d60a67987f05

so, presumably it's safe to remove for consistency.

Reviewers: hctim, samsonov, morehouse, kcc, vitalybuka

Reviewed By: hctim, samsonov, vitalybuka

Subscribers: delcypher, #sanitizers, llvm-commits, kcc

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D67193

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@371442 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ubsan/ubsan_flags.cpp b/lib/ubsan/ubsan_flags.cpp
index 80de2a6..721c227 100644
--- a/lib/ubsan/ubsan_flags.cpp
+++ b/lib/ubsan/ubsan_flags.cpp
@@ -54,7 +54,6 @@
   {
     CommonFlags cf;
     cf.CopyFrom(*common_flags());
-    cf.print_summary = false;
     cf.external_symbolizer_path = GetFlag("UBSAN_SYMBOLIZER_PATH");
     OverrideCommonFlags(cf);
   }
diff --git a/test/ubsan/TestCases/Misc/print_summary.c b/test/ubsan/TestCases/Misc/print_summary.c
new file mode 100644
index 0000000..b67a061
--- /dev/null
+++ b/test/ubsan/TestCases/Misc/print_summary.c
@@ -0,0 +1,11 @@
+// RUN: %clang -fsanitize=undefined %s -O3 -o %t
+// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT
+// RUN: %env_ubsan_opts=print_summary=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NO_SUMMARY
+
+// CHECK-DEFAULT: SUMMARY: UndefinedBehaviorSanitizer: {{.*}}
+// CHECK-NO_SUMMARY-NOT: SUMMARY: UndefinedBehaviorSanitizer: {{.*}}
+
+int main(int argc, char **argv) {
+  int arr[argc - 2];
+  return 0;
+}