Skip to content

Commit

Permalink
[Frontend] Rename a member variable to clarify its intent.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173854 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Jan 29, 2013
1 parent 49ffaef commit f85541c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/Frontend/InitHeaderSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f85541c

Please sign in to comment.