OSDN Git Service

[X86] Initialize Type and Subtype in getHostCPUName to 0.
authorCraig Topper <craig.topper@intel.com>
Fri, 3 Nov 2017 18:02:44 +0000 (18:02 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 3 Nov 2017 18:02:44 +0000 (18:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317341 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Host.cpp

index c167df5..40ed87b 100644 (file)
@@ -1057,8 +1057,8 @@ StringRef sys::getHostCPUName() {
   detectX86FamilyModel(EAX, &Family, &Model);
   getAvailableFeatures(ECX, EDX, MaxLeaf, &Features, &Features2);
 
-  unsigned Type;
-  unsigned Subtype;
+  unsigned Type = 0;
+  unsigned Subtype = 0;
 
   if (Vendor == SIG_INTEL) {
     getIntelProcessorTypeAndSubtype(Family, Model, Brand_id, Features,