[PATCH] D31495: Fix a bug that -isysroot is completely ignored on Unix

Yuka Takahashi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 22:11:50 PDT 2017


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31495.97543.patch
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170503/b2561b46/attachment-0001.bin>


More information about the cfe-commits mailing list