[cfe-commits] r43516 - in /cfe/trunk/CodeGen: CGExpr.cpp CGExprAgg.cpp CGExprComplex.cpp CGExprScalar.cpp CGStmt.cpp CodeGenModule.cpp CodeGenTypes.cpp

Devang Patel dpatel at apple.com
Tue Oct 30 13:59:41 PDT 2007


Author: dpatel
Date: Tue Oct 30 15:59:40 2007
New Revision: 43516

URL: http://llvm.org/viewvc/llvm-project?rev=43516&view=rev
Log:
Fix 80 col violations.

Modified:
    cfe/trunk/CodeGen/CGExpr.cpp
    cfe/trunk/CodeGen/CGExprAgg.cpp
    cfe/trunk/CodeGen/CGExprComplex.cpp
    cfe/trunk/CodeGen/CGExprScalar.cpp
    cfe/trunk/CodeGen/CGStmt.cpp
    cfe/trunk/CodeGen/CodeGenModule.cpp
    cfe/trunk/CodeGen/CodeGenTypes.cpp

Modified: cfe/trunk/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExpr.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/CodeGen/CGExpr.cpp Tue Oct 30 15:59:40 2007
@@ -230,7 +230,7 @@
   Builder.CreateStore(Src.getScalarVal(), DstAddr);
 }
 
-void CodeGenFunction::EmitStoreThroughOCUComponentLValue(RValue Src, LValue Dst, 
+void CodeGenFunction::EmitStoreThroughOCUComponentLValue(RValue Src, LValue Dst,
                                                          QualType Ty) {
   // This access turns into a read/modify/write of the vector.  Load the input
   // value now.
@@ -392,9 +392,9 @@
     
     if (E->isArrow()) {
       QualType PTy = cast<PointerType>(BaseExpr->getType())->getPointeeType();
-      BaseValue =  Builder.CreateBitCast(BaseValue, 
-                                         llvm::PointerType::get(ConvertType(PTy)),
-                                         "tmp");
+      BaseValue =  
+        Builder.CreateBitCast(BaseValue, 
+                              llvm::PointerType::get(ConvertType(PTy)), "tmp");
     }
   } else
     BaseValue = EmitScalarExpr(BaseExpr);
@@ -408,7 +408,8 @@
   // Match union field type.
   if (BaseExpr->getType()->isUnionType()) {
     const llvm::Type * FieldTy = ConvertType(Field->getType());
-    const llvm::PointerType * BaseTy = cast<llvm::PointerType>(BaseValue->getType());
+    const llvm::PointerType * BaseTy = 
+      cast<llvm::PointerType>(BaseValue->getType());
     if (FieldTy != BaseTy->getElementType()) {
       V = Builder.CreateBitCast(V, llvm::PointerType::get(FieldTy), "tmp");
     }

Modified: cfe/trunk/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprAgg.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/CodeGen/CGExprAgg.cpp Tue Oct 30 15:59:40 2007
@@ -194,13 +194,15 @@
 
   std::vector<llvm::Constant*> ArrayElts;
   const llvm::PointerType *APType = cast<llvm::PointerType>(DestPtr->getType());
-  const llvm::ArrayType *AType = cast<llvm::ArrayType>(APType->getElementType());
+  const llvm::ArrayType *AType = 
+    cast<llvm::ArrayType>(APType->getElementType());
 
   // Copy initializer elements.
   bool AllConstElements = true;
   unsigned i = 0;
   for (i = 0; i < NumInitElements; ++i) {
-    if (llvm::Constant *C = dyn_cast<llvm::Constant>(CGF.EmitScalarExpr(E->getInit(i))))
+    if (llvm::Constant *C = 
+        dyn_cast<llvm::Constant>(CGF.EmitScalarExpr(E->getInit(i))))
       ArrayElts.push_back(C);
     else {
       AllConstElements = false;

Modified: cfe/trunk/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprComplex.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/CodeGen/CGExprComplex.cpp Tue Oct 30 15:59:40 2007
@@ -303,13 +303,15 @@
     NextVal = llvm::ConstantInt::get(InVal.first->getType(), AmountVal);
   else if (InVal.first->getType() == llvm::Type::FloatTy)
     // FIXME: Handle long double.
-    NextVal = llvm::ConstantFP::get(InVal.first->getType(), 
-                                    llvm::APFloat(static_cast<float>(AmountVal)));
+    NextVal = 
+      llvm::ConstantFP::get(InVal.first->getType(), 
+                            llvm::APFloat(static_cast<float>(AmountVal)));
   else {
     // FIXME: Handle long double.
     assert(InVal.first->getType() == llvm::Type::DoubleTy);
-    NextVal = llvm::ConstantFP::get(InVal.first->getType(), 
-                                    llvm::APFloat(static_cast<double>(AmountVal)));
+    NextVal = 
+      llvm::ConstantFP::get(InVal.first->getType(), 
+                            llvm::APFloat(static_cast<double>(AmountVal)));
   }
   
   // Add the inc/dec to the real part.

Modified: cfe/trunk/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprScalar.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/CodeGen/CGExprScalar.cpp Tue Oct 30 15:59:40 2007
@@ -496,13 +496,15 @@
       NextVal = llvm::ConstantInt::get(InVal->getType(), AmountVal);
     else if (InVal->getType() == llvm::Type::FloatTy)
       // FIXME: Handle long double.
-      NextVal = llvm::ConstantFP::get(InVal->getType(),
-                                    llvm::APFloat(static_cast<float>(AmountVal)));
+      NextVal = 
+        llvm::ConstantFP::get(InVal->getType(),
+                              llvm::APFloat(static_cast<float>(AmountVal)));
     else {
       // FIXME: Handle long double.
       assert(InVal->getType() == llvm::Type::DoubleTy);
-      NextVal = llvm::ConstantFP::get(InVal->getType(),
-                                      llvm::APFloat(static_cast<double>(AmountVal)));
+      NextVal = 
+        llvm::ConstantFP::get(InVal->getType(),
+                              llvm::APFloat(static_cast<double>(AmountVal)));
     }
     NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
   }
@@ -907,7 +909,8 @@
 
 Value *ScalarExprEmitter::VisitChooseExpr(ChooseExpr *E) {
   // Emit the LHS or RHS as appropriate.
-  return Visit(E->isConditionTrue(CGF.getContext()) ? E->getLHS() : E->getRHS());
+  return
+    Visit(E->isConditionTrue(CGF.getContext()) ? E->getLHS() : E->getRHS());
 }
 
 Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE)

Modified: cfe/trunk/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGStmt.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/CodeGen/CGStmt.cpp Tue Oct 30 15:59:40 2007
@@ -469,8 +469,8 @@
   llvm::BasicBlock *NextBlock = new llvm::BasicBlock("after.sw", CurFn);
   SwitchInsn = Builder.CreateSwitch(CondV, NextBlock);
 
-  // All break statements jump to NextBlock. If BreakContinueStack is non empty then
-  // reuse last ContinueBlock.
+  // All break statements jump to NextBlock. If BreakContinueStack is non empty
+  // then reuse last ContinueBlock.
   llvm::BasicBlock *ContinueBlock = NULL;
   if (!BreakContinueStack.empty())
     ContinueBlock = BreakContinueStack.back().ContinueBlock;

Modified: cfe/trunk/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenModule.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/CodeGen/CodeGenModule.cpp Tue Oct 30 15:59:40 2007
@@ -83,15 +83,18 @@
 
       std::vector<llvm::Constant*> ArrayElts;
       const llvm::PointerType *APType = cast<llvm::PointerType>(GV->getType());
-      const llvm::ArrayType *AType = cast<llvm::ArrayType>(APType->getElementType());
+      const llvm::ArrayType *AType = 
+        cast<llvm::ArrayType>(APType->getElementType());
       
       // Copy initializer elements.
       unsigned i = 0;
       for (i = 0; i < NumInitElements; ++i) {
         assert (ILE->getInit(i)->getType()->isIntegerType() 
                 && "Only IntegerType global array initializers are supported");
-        llvm::APSInt Value(static_cast<uint32_t>(
-           getContext().getTypeSize(ILE->getInit(i)->getType(), SourceLocation())));
+        llvm::APSInt 
+          Value(static_cast<uint32_t>
+                (getContext().getTypeSize(ILE->getInit(i)->getType(), 
+                                          SourceLocation())));
         if (ILE->getInit(i)->isIntegerConstantExpr(Value, Context)) {
           llvm::Constant *C = llvm::ConstantInt::get(Value);
           ArrayElts.push_back(C);
@@ -100,8 +103,9 @@
       
       // Initialize remaining array elements.
       unsigned NumArrayElements = AType->getNumElements();
+      const llvm::Type *AElemTy = AType->getElementType();
       for (; i < NumArrayElements; ++i)
-        ArrayElts.push_back(llvm::Constant::getNullValue(AType->getElementType()));
+        ArrayElts.push_back(llvm::Constant::getNullValue(AElemTy));
       
       Init = llvm::ConstantArray::get(AType, ArrayElts);
     } else

Modified: cfe/trunk/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenTypes.cpp?rev=43516&r1=43515&r2=43516&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/CodeGen/CodeGenTypes.cpp Tue Oct 30 15:59:40 2007
@@ -235,8 +235,9 @@
         return OpaqueI->second;
 
       // Create new OpaqueType now for later use.
-      // FIXME: This creates a lot of opaque types, most of which are not needed.  
-      // Reevaluate this when performance analyis finds tons of opaque types.
+      // FIXME: This creates a lot of opaque types, most of them are not 
+      // needed. Reevaluate this when performance analyis finds tons of 
+      // opaque types.
       llvm::OpaqueType *OpaqueTy =  llvm::OpaqueType::get();
       RecordTypesToResolve[RD] = OpaqueTy;
       TypeHolderMap.insert(std::make_pair(T.getTypePtr(), 





More information about the cfe-commits mailing list