[clang] 2267549 - Fix the build after cd26190a10fceb6e1472fabcd9e1736f62f078c4

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 09:04:01 PDT 2022


Author: Aaron Ballman
Date: 2022-03-31T12:03:53-04:00
New Revision: 2267549296dabfed31ce194bb124f7bdb91f74c5

URL: https://github.com/llvm/llvm-project/commit/2267549296dabfed31ce194bb124f7bdb91f74c5
DIFF: https://github.com/llvm/llvm-project/commit/2267549296dabfed31ce194bb124f7bdb91f74c5.diff

LOG: Fix the build after cd26190a10fceb6e1472fabcd9e1736f62f078c4

These variables were being used uninitialized and it caused a
significant number of test failures on Windows.

Added: 
    

Modified: 
    clang/lib/CodeGen/TargetInfo.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index e1df6f505b17c..c5a031d5487cf 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -3960,7 +3960,7 @@ void X86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const {
   // Keep track of the number of assigned registers.
   unsigned FreeIntRegs = IsRegCall ? 11 : 6;
   unsigned FreeSSERegs = IsRegCall ? 16 : 8;
-  unsigned NeededInt, NeededSSE, MaxVectorWidth = 0;
+  unsigned NeededInt = 0, NeededSSE = 0, MaxVectorWidth = 0;
 
   if (!::classifyReturnType(getCXXABI(), FI, *this)) {
     if (IsRegCall && FI.getReturnType()->getTypePtr()->isRecordType() &&


        


More information about the cfe-commits mailing list