Driver: correct behaviour of -fmsc-version=MAJOR
Ensure that we properly handle the case where just the major version component is provided by the user. Thanks to Alp Toker for pointing out that this was not handled correctly! llvm-svn: 211506
This commit is contained in:
@@ -1223,7 +1223,11 @@ static unsigned parseMSCVersion(ArgList &Args, DiagnosticsEngine &Diags) {
|
||||
<< Arg->getAsString(Args) << Value;
|
||||
return 0;
|
||||
}
|
||||
return (Version < 100000) ? Version * 100000 : Version;
|
||||
if (Version < 100)
|
||||
Version = Version * 100; // major -> major.minor
|
||||
if (Version < 100000)
|
||||
Version = Version * 100000; // major.minor -> major.minor.build
|
||||
return Version;
|
||||
}
|
||||
|
||||
// parse the dot-delimited component version
|
||||
|
||||
Reference in New Issue
Block a user