Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
210ea10e
Commit
210ea10e
authored
Jun 11, 2009
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the logic for determining whether cxxabi.h is available.
parent
683f431d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
gtest-type-util.h
include/gtest/internal/gtest-type-util.h
+6
-4
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