r185792 - Simplify code. No functional change.

Craig Topper craig.topper at gmail.com
Sun Jul 7 21:47:18 PDT 2013


Author: ctopper
Date: Sun Jul  7 23:47:18 2013
New Revision: 185792

URL: http://llvm.org/viewvc/llvm-project?rev=185792&view=rev
Log:
Simplify code. No functional change.

Modified:
    cfe/trunk/lib/CodeGen/TargetInfo.cpp

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=185792&r1=185791&r2=185792&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Sun Jul  7 23:47:18 2013
@@ -901,9 +901,7 @@ ABIArgInfo X86_32ABIInfo::classifyArgume
     bool NeedsPadding;
     if (shouldUseInReg(Ty, FreeRegs, IsFastCall, NeedsPadding)) {
       unsigned SizeInRegs = (getContext().getTypeSize(Ty) + 31) / 32;
-      SmallVector<llvm::Type*, 3> Elements;
-      for (unsigned I = 0; I < SizeInRegs; ++I)
-        Elements.push_back(Int32);
+      SmallVector<llvm::Type*, 3> Elements(SizeInRegs, Int32);
       llvm::Type *Result = llvm::StructType::get(LLVMContext, Elements);
       return ABIArgInfo::getDirectInReg(Result);
     }





More information about the cfe-commits mailing list