Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
210ea10e
Commit
210ea10e
authored
Jun 11, 2009
by
zhanyong.wan
Browse files
Fixes the logic for determining whether cxxabi.h is available.
parent
683f431d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
include/gtest/internal/gtest-type-util.h
include/gtest/internal/gtest-type-util.h
+6
-4
include/gtest/internal/gtest-type-util.h.pump
include/gtest/internal/gtest-type-util.h.pump
+6
-4
No files found.
include/gtest/internal/gtest-type-util.h
View file @
210ea10e
...
...
@@ -47,9 +47,11 @@
#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
#ifdef __GNUC__
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
// libstdc++ (which is where cxxabi.h comes from).
#ifdef __GLIBCXX__
#include <cxxabi.h>
#endif // __G
NUC
__
#endif // __G
LIBCXX
__
#include <typeinfo>
...
...
@@ -74,7 +76,7 @@ String GetTypeName() {
#if GTEST_HAS_RTTI
const
char
*
const
name
=
typeid
(
T
).
name
();
#ifdef __G
NUC
__
#ifdef __G
LIBCXX
__
int
status
=
0
;
// gcc's implementation of typeid(T).name() mangles the type name,
// so we have to demangle it.
...
...
@@ -84,7 +86,7 @@ String GetTypeName() {
return
name_str
;
#else
return
name
;
#endif // __G
NUC
__
#endif // __G
LIBCXX
__
#else
return
"<type>"
;
...
...
include/gtest/internal/gtest-type-util.h.pump
View file @
210ea10e
...
...
@@ -47,9 +47,11 @@ $var n = 50 $$ Maximum length of type lists we want to support.
#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
#ifdef __GNUC__
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
// libstdc++ (which is where cxxabi.h comes from).
#ifdef __GLIBCXX__
#include <cxxabi.h>
#endif // __G
NUC
__
#endif // __G
LIBCXX
__
#include <typeinfo>
...
...
@@ -74,7 +76,7 @@ String GetTypeName() {
#if GTEST_HAS_RTTI
const
char
*
const
name
=
typeid
(
T
).
name
();
#ifdef __G
NUC
__
#ifdef __G
LIBCXX
__
int
status
=
0
;
// gcc's implementation of typeid(T).name() mangles the type name,
// so we have to demangle it.
...
...
@@ -84,7 +86,7 @@ String GetTypeName() {
return
name_str
;
#else
return
name
;
#endif // __G
NUC
__
#endif // __G
LIBCXX
__
#else
return
"<type>"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment