diff options
| author | Zachary Turner <zturner@google.com> | 2015-03-13 20:54:57 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-03-13 20:54:57 +0000 |
| commit | 719ec93a7447e31fcff92bcebf015a758c8df841 (patch) | |
| tree | 5e2a58d33da093150ad5d893d72fd3d20e79e015 /lldb/unittests/gtest_common.h | |
| parent | 26d7fcfc38044cf6a939cadb390528d60a1cb9d7 (diff) | |
| download | bcm5719-llvm-719ec93a7447e31fcff92bcebf015a758c8df841.tar.gz bcm5719-llvm-719ec93a7447e31fcff92bcebf015a758c8df841.zip | |
Rework the gtest directory structure.
This makes the directory structure mirror the canonical LLVM
directory structure for a gtest suite.
Additionally, this patch deletes the xcode project. Nobody
is currently depending on this, and it would be better to have
gtest unit tests be hand-maintained in the Xcode workspace
rather than using this python test runner. Patches to that
effect will be submitted as followups.
llvm-svn: 232211
Diffstat (limited to 'lldb/unittests/gtest_common.h')
| -rw-r--r-- | lldb/unittests/gtest_common.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lldb/unittests/gtest_common.h b/lldb/unittests/gtest_common.h new file mode 100644 index 00000000000..228dfb0d328 --- /dev/null +++ b/lldb/unittests/gtest_common.h @@ -0,0 +1,32 @@ +//===-- gtest_common.h ------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(LLDB_GTEST_COMMON_H)
+#error "gtest_common.h should not be included manually."
+#else
+#define LLDB_GTEST_COMMON_H
+#endif
+
+// This header file is force included by all of LLDB's unittest compilation
+// units. Be very leary about putting anything in this file.
+
+#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0)
+// MSVC's STL implementation tries to work well with /EHs-c- and
+// _HAS_EXCEPTIONS=0. But <thread> in particular doesn't work with it, because
+// it relies on <concrt.h> which tries to throw an exception without checking
+// for _HAS_EXCEPTIONS=0. This causes the linker to require a definition of
+// __uncaught_exception(), but the STL doesn't define this function when
+// _HAS_EXCEPTIONS=0. The workaround here is to just provide a stub
+// implementation to get it to link.
+inline bool
+__uncaught_exception()
+{
+ return true;
+}
+#endif
|

