[PATCH] D14727: [Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installations
Thiago Macieira via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 16 13:31:42 PST 2015
thiagomacieira created this revision.
thiagomacieira added a reviewer: cfe-commits.
Some GCC 5 installations store the libstdc++ includes and GCC-specific files in paths without
the minor part of the version number, such as
/usr/include/c++/5
/usr/lib64/gcc/x86_64-suse-linux/5
http://reviews.llvm.org/D14727
Files:
lib/Driver/ToolChains.cpp
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp
+++ lib/Driver/ToolChains.cpp
@@ -1231,13 +1231,12 @@
if (First.first.getAsInteger(10, GoodVersion.Major) || GoodVersion.Major < 0)
return BadVersion;
GoodVersion.MajorStr = First.first.str();
- if (Second.first.getAsInteger(10, GoodVersion.Minor) || GoodVersion.Minor < 0)
- return BadVersion;
GoodVersion.MinorStr = Second.first.str();
// First look for a number prefix and parse that if present. Otherwise just
// stash the entire patch string in the suffix, and leave the number
// unspecified. This covers versions strings such as:
+ // 5
// 4.4
// 4.4.0
// 4.4.x
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14727.40332.patch
Type: text/x-patch
Size: 747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151116/b8373c93/attachment.bin>
More information about the cfe-commits
mailing list