Index: lib/Driver/ToolChains/Gnu.cpp =================================================================== --- lib/Driver/ToolChains/Gnu.cpp +++ lib/Driver/ToolChains/Gnu.cpp @@ -1617,7 +1617,8 @@ } // Then look for gcc installed alongside clang. - Prefixes.push_back(D.InstalledDir + "/.."); + if (!D.InstalledDir.empty()) + Prefixes.push_back(D.InstalledDir + "/.."); // Then look for distribution supplied gcc installations. if (D.SysRoot.empty()) {