[Frontend] Rename a member variable to clarify its intent.

llvm-svn: 173854
This commit is contained in:
Daniel Dunbar 2013-01-29 23:59:43 +00:00
parent 2e8eb01a71
commit 335a37b7e0
1 changed files with 6 additions and 5 deletions

View File

@ -43,13 +43,13 @@ class InitHeaderSearch {
HeaderSearch &Headers;
bool Verbose;
std::string IncludeSysroot;
bool IsNotEmptyOrRoot;
bool HasSysroot;
public:
InitHeaderSearch(HeaderSearch &HS, bool verbose, StringRef sysroot)
: Headers(HS), Verbose(verbose), IncludeSysroot(sysroot),
IsNotEmptyOrRoot(!(sysroot.empty() || sysroot == "/")) {
HasSysroot(!(sysroot.empty() || sysroot == "/")) {
}
/// AddPath - Add the specified path to the specified group list.
@ -121,9 +121,10 @@ void InitHeaderSearch::AddPath(const Twine &Path,
SmallString<256> MappedPathStorage;
StringRef MappedPathStr = Path.toStringRef(MappedPathStorage);
// Handle isysroot.
if ((Group == System || Group == CXXSystem) && !IgnoreSysRoot &&
CanPrefixSysroot(MappedPathStr) && IsNotEmptyOrRoot) {
// Prepend the sysroot, if desired and this is a system header group.
if (HasSysroot && !IgnoreSysRoot &&
(Group == System || Group == CXXSystem) &&
CanPrefixSysroot(MappedPathStr)) {
MappedPathStorage.clear();
MappedPathStr = (IncludeSysroot + Path).toStringRef(MappedPathStorage);
}