summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/sanitizer_test_main.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-07-31 19:11:14 +0000
committerNico Weber <nicolasweber@gmx.de>2019-07-31 19:11:14 +0000
commit886a651f4fb6414d55f95be534f20341725b0231 (patch)
tree68c4e53779ffde5bf672332e7acaeb367e2cff51 /lib/sanitizer_common/tests/sanitizer_test_main.cpp
parent124fd5d9aff57cf47bf077df81ad939b289acc6e (diff)
downloadcompiler-rt-886a651f4fb6414d55f95be534f20341725b0231.tar.gz
compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp
See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $(basename $f) . ; done and manually updated references to renamed files found by that. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@367467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests/sanitizer_test_main.cpp')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_test_main.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_test_main.cpp b/lib/sanitizer_common/tests/sanitizer_test_main.cpp
new file mode 100644
index 000000000..caab5ec28
--- /dev/null
+++ b/lib/sanitizer_common/tests/sanitizer_test_main.cpp
@@ -0,0 +1,23 @@
+//===-- sanitizer_test_main.cpp -------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of ThreadSanitizer/AddressSanitizer runtime.
+//
+//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+#include "sanitizer_common/sanitizer_flags.h"
+
+const char *argv0;
+
+int main(int argc, char **argv) {
+ argv0 = argv[0];
+ testing::GTEST_FLAG(death_test_style) = "threadsafe";
+ testing::InitGoogleTest(&argc, argv);
+ __sanitizer::SetCommonFlagsDefaults();
+ return RUN_ALL_TESTS();
+}