summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-06 08:21:04 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-06 08:21:04 +0000
commit5da43e83d206f164c1a1052f5fff36d82ab28f60 (patch)
treed7db4a8fb2ee8faae35b3bea621a436ad03930eb /clang/lib/Driver
parent28e39d4b1777a8dbae007e81d33c2657509468af (diff)
downloadbcm5719-llvm-5da43e83d206f164c1a1052f5fff36d82ab28f60.tar.gz
bcm5719-llvm-5da43e83d206f164c1a1052f5fff36d82ab28f60.zip
Revert r143864, as the problem I was actually looking at can be solved
a better way. The more I think about it the more worried I am that this hammer is simply too large. We should only be reaching out to the filesystem when doing interesting "detection" things, not gratuitously. Original commit message: Start pruning down the set of flags passed to CC1 for header search. This cleans up the CC1 invocations, and reduces the overhead there. We're still hammering the filesystem looking for the C++ standard libraries though. The only reservation I have about this policy is the case of virtualized files inside of CC1, but it's not clear what the best way to solve that is. The Driver consistently queries the actual filesystem to make its decisions. Changing that would be a very large undertaking. It might be worthwhile, but it's not an immediate goal. llvm-svn: 143865
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/ToolChains.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 6d31e462043..3d4f12cb865 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -56,10 +56,6 @@ using namespace clang;
/// \brief Utility function to add a system include directory to CC1 arguments.
static void addSystemInclude(const ArgList &DriverArgs, ArgStringList &CC1Args,
const Twine &Path) {
- // Prune out non-existent directories to minimize the number of flags.
- if (!llvm::sys::fs::exists(Path))
- return;
-
CC1Args.push_back("-internal-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(Path));
}
@@ -74,10 +70,6 @@ static void addSystemInclude(const ArgList &DriverArgs, ArgStringList &CC1Args,
/// classification.
static void addExternCSystemInclude(const ArgList &DriverArgs,
ArgStringList &CC1Args, const Twine &Path) {
- // Prune out non-existent directories to minimize the number of flags.
- if (!llvm::sys::fs::exists(Path))
- return;
-
CC1Args.push_back("-internal-externc-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(Path));
}
@@ -88,10 +80,6 @@ static void addSystemIncludes(const ArgList &DriverArgs,
ArrayRef<StringRef> Paths) {
for (ArrayRef<StringRef>::iterator I = Paths.begin(), E = Paths.end();
I != E; ++I) {
- // Prune out non-existent directories to minimize the number of flags.
- if (!llvm::sys::fs::exists(*I))
- continue;
-
CC1Args.push_back("-internal-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(*I));
}
OpenPOWER on IntegriCloud