Summary:
getAsInteger returns true on error. Oops.
No test because the behavior at the moment is identical with or without
this change.
Reviewers: tra
Subscribers: cfe-commits, Prazek
Differential Revision: https://reviews.llvm.org/D23340
llvm-svn: 278733
int Major = -1, Minor = -1;
auto First = V.split('.');
auto Second = First.second.split('.');
- if (!First.first.getAsInteger(10, Major) ||
- !Second.first.getAsInteger(10, Minor))
+ if (First.first.getAsInteger(10, Major) ||
+ Second.first.getAsInteger(10, Minor))
return CudaVersion::UNKNOWN;
if (Major == 7 && Minor == 0) {