Apply sysroot to system c++ headers too. Fixes PR9372.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126884 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 2a27fb1..dc40784 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -113,7 +113,7 @@
llvm::StringRef MappedPathStr = Path.toStringRef(MappedPathStorage);
// Handle isysroot.
- if (Group == System && !IgnoreSysRoot &&
+ if ((Group == System || Group == CXXSystem) && !IgnoreSysRoot &&
llvm::sys::path::is_absolute(MappedPathStr) &&
IsNotEmptyOrRoot) {
MappedPathStorage.clear();