summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-24 22:27:37 +0000
committerChris Lattner <sabre@nondot.org>2010-08-24 22:27:37 +0000
commit576048657ecee4548683de12e28152cb5262bcd8 (patch)
tree60cf6cf159b527f96cfa8cebff35a19a6c883269 /clang/lib/Frontend/CompilerInvocation.cpp
parent5f0c066062af99e6d147cafa99acdf016ea3afa4 (diff)
downloadbcm5719-llvm-576048657ecee4548683de12e28152cb5262bcd8.tar.gz
bcm5719-llvm-576048657ecee4548683de12e28152cb5262bcd8.zip
correct the -isystem option to not add the -isysroot path. Only the weird
-iwithsysroot flag should do that. This fixes rdar://8345942 llvm-svn: 111979
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index f0a9bf457f8..86ce31538f3 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1149,7 +1149,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
for (arg_iterator it = Args.filtered_begin(OPT_I, OPT_F),
ie = Args.filtered_end(); it != ie; ++it)
Opts.AddPath((*it)->getValue(Args), frontend::Angled, true,
- /*IsFramework=*/ (*it)->getOption().matches(OPT_F));
+ /*IsFramework=*/ (*it)->getOption().matches(OPT_F), true);
// Add -iprefix/-iwith-prefix/-iwithprefixbefore options.
llvm::StringRef Prefix = ""; // FIXME: This isn't the correct default prefix.
@@ -1161,21 +1161,22 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
Prefix = A->getValue(Args);
else if (A->getOption().matches(OPT_iwithprefix))
Opts.AddPath(Prefix.str() + A->getValue(Args),
- frontend::System, false, false);
+ frontend::System, false, false, true);
else
Opts.AddPath(Prefix.str() + A->getValue(Args),
- frontend::Angled, false, false);
+ frontend::Angled, false, false, true);
}
for (arg_iterator it = Args.filtered_begin(OPT_idirafter),
ie = Args.filtered_end(); it != ie; ++it)
- Opts.AddPath((*it)->getValue(Args), frontend::After, true, false);
+ Opts.AddPath((*it)->getValue(Args), frontend::After, true, false, true);
for (arg_iterator it = Args.filtered_begin(OPT_iquote),
ie = Args.filtered_end(); it != ie; ++it)
- Opts.AddPath((*it)->getValue(Args), frontend::Quoted, true, false);
+ Opts.AddPath((*it)->getValue(Args), frontend::Quoted, true, false, true);
for (arg_iterator it = Args.filtered_begin(OPT_isystem, OPT_iwithsysroot),
ie = Args.filtered_end(); it != ie; ++it)
- Opts.AddPath((*it)->getValue(Args), frontend::System, true, false);
+ Opts.AddPath((*it)->getValue(Args), frontend::System, true, false,
+ (*it)->getOption().matches(OPT_iwithsysroot));
// FIXME: Need options for the various environment variables!
}
OpenPOWER on IntegriCloud