aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/init.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-16 06:31:05 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-16 06:31:05 +0000
commit66791df8d8b65c68de9ecf3246e895919af75bc2 (patch)
tree044620697110ce2e5f85173df2d9d2d8173b6114 /test/Preprocessor/init.c
parentce2b41dab3378750a79db518ab3ba8a5c8f39457 (diff)
Only predefine the macro _GNU_SOURCE in C++ mode when we're on a
platform that typically uses glibc. Fixes a Boost.Thread compilation failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/init.c')
-rw-r--r--test/Preprocessor/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
index cccee762e2..4ef460bbc6 100644
--- a/test/Preprocessor/init.c
+++ b/test/Preprocessor/init.c
@@ -11,7 +11,6 @@
//
// RUN: %clang_cc1 -x c++ -std=c++0x -E -dM < /dev/null | FileCheck -check-prefix CXX0X %s
//
-// CXX0X:#define _GNU_SOURCE 1
// CXX0X:#define __DEPRECATED 1
// CXX0X:#define __GNUG__
// CXX0X:#define __GXX_EXPERIMENTAL_CXX0X__ 1
@@ -22,7 +21,6 @@
//
// RUN: %clang_cc1 -x c++ -std=c++98 -E -dM < /dev/null | FileCheck -check-prefix CXX98 %s
//
-// CXX98:#define _GNU_SOURCE 1
// CXX98:#define __DEPRECATED 1
// CXX98:#define __GNUG__
// CXX98:#define __GXX_WEAK__ 1
@@ -58,7 +56,6 @@
//
// RUN: %clang_cc1 -x c++ -std=gnu++98 -E -dM < /dev/null | FileCheck -check-prefix GXX98 %s
//
-// GXX98:#define _GNU_SOURCE 1
// GXX98:#define __DEPRECATED 1
// GXX98:#define __GNUG__
// GXX98:#define __GXX_WEAK__ 1
@@ -1028,3 +1025,6 @@
// X86_64:#define __x86_64 1
// X86_64:#define __x86_64__ 1
//
+// RUN: %clang_cc1 -x c++ -triple i686-pc-linux-gnu -E -dM < /dev/null | FileCheck -check-prefix GNUSOURCE %s
+// GNUSOURCE:#define _GNU_SOURCE 1
+//