diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp index c8052e3d79e1..260efae5bf6f 100644 --- a/clang/lib/ARCMigrate/ARCMT.cpp +++ b/clang/lib/ARCMigrate/ARCMT.cpp @@ -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; diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 9344b6524751..4ff0a643d206 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -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