Fix "Uninitialized" warnings on g++-4.4.

In fact, they are false warnings but it seems g++-4.4 might be unable to know they must be false.

llvm-svn: 137568
This commit is contained in:
NAKAMURA Takumi 2011-08-14 00:37:22 +00:00
parent 45620380b5
commit c77574a2e3
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ static bool HasARCRuntime(CompilerInvocation &origCI) {
continue;
if (!define.startswith(SimulatorVersionDefineName()))
continue;
unsigned Major, Minor, Micro;
unsigned Major = 0, Minor = 0, Micro = 0;
if (GetVersionFromSimulatorDefine(define, Major, Minor, Micro) &&
Major < 10 && Minor < 100 && Micro < 100)
return Major >= 5;

View File

@ -515,7 +515,7 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
ie = Args.filtered_end(); it != ie; ++it) {
StringRef define = (*it)->getValue(Args);
if (define.startswith(SimulatorVersionDefineName())) {
unsigned Major, Minor, Micro;
unsigned Major = 0, Minor = 0, Micro = 0;
if (GetVersionFromSimulatorDefine(define, Major, Minor, Micro) &&
Major < 10 && Minor < 100 && Micro < 100) {
ARCRuntimeForSimulator = Major < 5 ? ARCSimulator_NoARCRuntime