Index: cfe/trunk/lib/Driver/Distro.cpp =================================================================== --- cfe/trunk/lib/Driver/Distro.cpp +++ cfe/trunk/lib/Driver/Distro.cpp @@ -108,11 +108,14 @@ if (!Line.trim().startswith("VERSION")) continue; std::pair SplitLine = Line.split('='); + // Old versions have split VERSION and PATCHLEVEL + // Newer versions use VERSION = x.y + std::pair SplitVer = SplitLine.second.trim().split('.'); int Version; + // OpenSUSE/SLES 10 and older are not supported and not compatible // with our rules, so just treat them as Distro::UnknownDistro. - if (!SplitLine.second.trim().getAsInteger(10, Version) && - Version > 10) + if (!SplitVer.first.getAsInteger(10, Version) && Version > 10) return Distro::OpenSUSE; return Distro::UnknownDistro; }