This revision was automatically updated to reflect the committed changes.
Closed by commit rL301998: Fix a bug that -isysroot is completely ignored on 
Unix (authored by yamaguchi).

Changed prior to commit:
  https://reviews.llvm.org/D31495?vs=95402&id=97543#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31495

Files:
  cfe/trunk/lib/Frontend/CompilerInvocation.cpp
  cfe/trunk/test/Driver/sysroot-flags.c


Index: cfe/trunk/test/Driver/sysroot-flags.c
===================================================================
--- cfe/trunk/test/Driver/sysroot-flags.c
+++ cfe/trunk/test/Driver/sysroot-flags.c
@@ -26,3 +26,7 @@
 // RUN:   FileCheck %s -check-prefix=SYSROOT_SEPARATE
 // SYSROOT_SEPARATE: "-isysroot" "{{[^"]*}}/foo/bar"
 // SYSROOT_SEPARATE: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar"
+
+// Check that -isysroot is handled properly
+// RUN: %clang -isysroot /foo/bar -c %s -v 2>&1 | \
+// RUN:   grep "/foo/bar"
Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -1565,7 +1565,7 @@
     frontend::IncludeDirGroup Group = frontend::System;
     if (A->getOption().matches(OPT_internal_externc_isystem))
       Group = frontend::ExternCSystem;
-    Opts.AddPath(A->getValue(), Group, false, true);
+    Opts.AddPath(A->getValue(), Group, false, false);
   }
 
   // Add the path prefixes which are implicitly treated as being system 
headers.


Index: cfe/trunk/test/Driver/sysroot-flags.c
===================================================================
--- cfe/trunk/test/Driver/sysroot-flags.c
+++ cfe/trunk/test/Driver/sysroot-flags.c
@@ -26,3 +26,7 @@
 // RUN:   FileCheck %s -check-prefix=SYSROOT_SEPARATE
 // SYSROOT_SEPARATE: "-isysroot" "{{[^"]*}}/foo/bar"
 // SYSROOT_SEPARATE: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar"
+
+// Check that -isysroot is handled properly
+// RUN: %clang -isysroot /foo/bar -c %s -v 2>&1 | \
+// RUN:   grep "/foo/bar"
Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -1565,7 +1565,7 @@
     frontend::IncludeDirGroup Group = frontend::System;
     if (A->getOption().matches(OPT_internal_externc_isystem))
       Group = frontend::ExternCSystem;
-    Opts.AddPath(A->getValue(), Group, false, true);
+    Opts.AddPath(A->getValue(), Group, false, false);
   }
 
   // Add the path prefixes which are implicitly treated as being system headers.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D31495: Fix a bug ... Vassil Vassilev via Phabricator via cfe-commits
    • [PATCH] D31495: Fix a... Yuka Takahashi via Phabricator via cfe-commits

Reply via email to