summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-19 06:48:28 +0000
committerChris Lattner <sabre@nondot.org>2009-02-19 06:48:28 +0000
commit06ef388a61db74e027ddececbc4b2ae4d57afb07 (patch)
tree0d47f59762214597b3038513331ff02ad6681aef /clang/lib
parent5555697fa092e609b7c5100cdc3f6949abe341a2 (diff)
downloadbcm5719-llvm-06ef388a61db74e027ddececbc4b2ae4d57afb07.tar.gz
bcm5719-llvm-06ef388a61db74e027ddececbc4b2ae4d57afb07.zip
fix a bug introduced in my previous patch: moving clang headers to the
"after" group instead of the system group makes it so #include <limits.h> picks up the *system* limits.h file before clang's. This causes a failure on linux and is definitely not what we want. llvm-svn: 65026
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/InitHeaderSearch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Driver/InitHeaderSearch.cpp b/clang/lib/Driver/InitHeaderSearch.cpp
index 4b5275d7264..5b0b2c2f72b 100644
--- a/clang/lib/Driver/InitHeaderSearch.cpp
+++ b/clang/lib/Driver/InitHeaderSearch.cpp
@@ -24,7 +24,7 @@ using namespace clang;
void InitHeaderSearch::AddPath(const std::string &Path, IncludeDirGroup Group,
bool isCXXAware, bool isUserSupplied,
- bool isFramework) {
+ bool isFramework, bool IgnoreSysRoot) {
assert(!Path.empty() && "can't handle empty path here");
FileManager &FM = Headers.getFileMgr();
@@ -32,7 +32,7 @@ void InitHeaderSearch::AddPath(const std::string &Path, IncludeDirGroup Group,
llvm::SmallString<256> MappedPath;
// Handle isysroot.
- if (Group == System) {
+ if (Group == System && !IgnoreSysRoot) {
// FIXME: Portability. This should be a sys::Path interface, this doesn't
// handle things like C:\ right, nor win32 \\network\device\blah.
if (isysroot.size() != 1 || isysroot[0] != '/') // Add isysroot if present.
OpenPOWER on IntegriCloud