[cfe-commits] r151889 - in /cfe/trunk/lib: Basic/Targets.cpp Frontend/InitHeaderSearch.cpp
David Chisnall
csdavec at swan.ac.uk
Fri Mar 2 02:49:52 PST 2012
Author: theraven
Date: Fri Mar 2 04:49:52 2012
New Revision: 151889
URL: http://llvm.org/viewvc/llvm-project?rev=151889&view=rev
Log:
Add the Solaris support directory to the header search when using libc++.
Unconditionally define __C99FEATURES__ when using C++ on Solaris. This is a
(hopefully temporary) work around for libc++ exposing C99-but-not-C++98
features in C++98 mode.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=151889&r1=151888&r2=151889&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Mar 2 04:49:52 2012
@@ -498,7 +498,7 @@
Builder.defineMacro("_XOPEN_SOURCE", "600");
else
Builder.defineMacro("_XOPEN_SOURCE", "500");
- if (Opts.CPlusPlus0x)
+ if (Opts.CPlusPlus)
Builder.defineMacro("__C99FEATURES__");
Builder.defineMacro("_LARGEFILE_SOURCE");
Builder.defineMacro("_LARGEFILE64_SOURCE");
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=151889&r1=151888&r2=151889&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Fri Mar 2 04:49:52 2012
@@ -461,6 +461,11 @@
AddPath(P.str(), CXXSystem, true, false, false, true);
}
}
+ // On Solaris, include the support directory for things like xlocale and
+ // fudged system headers.
+ if (triple.getOS() == llvm::Triple::Solaris)
+ AddPath("/usr/include/c++/v1/support/solaris", CXXSystem, true, false,
+ false);
AddPath("/usr/include/c++/v1", CXXSystem, true, false, false);
} else {
More information about the cfe-commits
mailing list