Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81681 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 926e5c6..31e74f0 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -270,18 +270,18 @@
       llvm::RoundUpToAlignment(CurrentOffsetInBytes, Align);
     
     unsigned NumPaddingBytes = AlignedOffsetInBytes - CurrentOffsetInBytes;
-    assert(NumPaddingBytes > 0 && "Can't append any padding!");
+    if (NumPaddingBytes > 0) {
+      const llvm::Type *Ty = llvm::Type::getInt8Ty(VMContext);
+      // FIXME: We need a sema error for alignment larger than the minimum of the
+      // maximal stack alignmint and the alignment of malloc on the system.
+      if (NumPaddingBytes > 1)
+        Ty = llvm::ArrayType::get(Ty, NumPaddingBytes);
     
-    const llvm::Type *Ty = llvm::Type::getInt8Ty(VMContext);
-    // FIXME: We need a sema error for alignment larger than the minimum of the
-    // maximal stack alignmint and the alignment of malloc on the system.
-    if (NumPaddingBytes > 1)
-      Ty = llvm::ArrayType::get(Ty, NumPaddingBytes);
-    
-    Types.push_back(Ty);
+      Types.push_back(Ty);
 
-    // We want a packed struct.
-    Packed = true;
+      // We want a packed struct.
+      Packed = true;
+    }
   }
 
   // T x;