[llvm-commits] [llvm] r51034 - in /llvm/branches/ggreif/use-diet/lib/VMCore: Constants.cpp Function.cpp Instructions.cpp Mangler.cpp TypeSymbolTable.cpp Use.cpp

Gabor Greif ggreif at gmail.com
Tue May 13 05:37:34 PDT 2008


Author: ggreif
Date: Tue May 13 07:37:25 2008
New Revision: 51034

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

Modified:
    llvm/branches/ggreif/use-diet/lib/VMCore/Constants.cpp
    llvm/branches/ggreif/use-diet/lib/VMCore/Function.cpp
    llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp
    llvm/branches/ggreif/use-diet/lib/VMCore/Mangler.cpp
    llvm/branches/ggreif/use-diet/lib/VMCore/TypeSymbolTable.cpp
    llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Constants.cpp?rev=51034&r1=51033&r2=51034&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Constants.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Constants.cpp Tue May 13 07:37:25 2008
@@ -539,9 +539,11 @@
   GetElementPtrConstantExpr(Constant *C, const std::vector<Constant*> &IdxList,
                             const Type *DestTy);
 public:
-  static GetElementPtrConstantExpr *Create(Constant *C, const std::vector<Constant*> &IdxList,
+  static GetElementPtrConstantExpr *Create(Constant *C,
+                                           const std::vector<Constant*>&IdxList,
                                            const Type *DestTy) {
-    return new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy);
+    return new(IdxList.size() + 1)
+      GetElementPtrConstantExpr(C, IdxList, DestTy);
   }
   /// Transparently provide more efficient getOperand methods.
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
@@ -1973,8 +1975,9 @@
 Constant *ConstantExpr::getGetElementPtrTy(const Type *ReqTy, Constant *C,
                                            Value* const *Idxs,
                                            unsigned NumIdx) {
-  assert(GetElementPtrInst::getIndexedType(C->getType(), Idxs, Idxs+NumIdx, true) &&
-         "GEP indices invalid!");
+  assert(GetElementPtrInst::getIndexedType(C->getType(),
+                                           Idxs, Idxs+NumIdx, true)
+         && "GEP indices invalid!");
 
   if (Constant *FC = ConstantFoldGetElementPtr(C, (Constant**)Idxs, NumIdx))
     return FC;          // Fold a few common cases...

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Function.cpp?rev=51034&r1=51033&r2=51034&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Function.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Function.cpp Tue May 13 07:37:25 2008
@@ -106,7 +106,8 @@
 /// it in its containing function.
 bool Argument::hasStructRetAttr() const {
   if (!isa<PointerType>(getType())) return false;
-  if (this != getParent()->arg_begin()) return false; // StructRet param must be first param
+  if (this != getParent()->arg_begin())
+    return false; // StructRet param must be first param
   return getParent()->paramHasAttr(1, ParamAttr::StructRet);
 }
 

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp?rev=51034&r1=51033&r2=51034&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp Tue May 13 07:37:25 2008
@@ -421,7 +421,8 @@
 
 InvokeInst::InvokeInst(const InvokeInst &II)
   : TerminatorInst(II.getType(), Instruction::Invoke,
-                   OperandTraits<InvokeInst>::op_end(this) - II.getNumOperands(),
+                   OperandTraits<InvokeInst>::op_end(this)
+                   - II.getNumOperands(),
                    II.getNumOperands()) {
   setParamAttrs(II.getParamAttrs());
   SubclassData = II.SubclassData;
@@ -464,7 +465,8 @@
 
 ReturnInst::ReturnInst(const ReturnInst &RI)
   : TerminatorInst(Type::VoidTy, Instruction::Ret,
-                   OperandTraits<ReturnInst>::op_end(this) - RI.getNumOperands(),
+                   OperandTraits<ReturnInst>::op_end(this)
+                   - RI.getNumOperands(),
                    RI.getNumOperands()) {
   unsigned N = RI.getNumOperands();
   if (N == 1)
@@ -997,7 +999,8 @@
 
 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
   : Instruction(reinterpret_cast<const Type*>(GEPI.getType()), GetElementPtr,
-                OperandTraits<GetElementPtrInst>::op_end(this) - GEPI.getNumOperands(),
+                OperandTraits<GetElementPtrInst>::op_end(this)
+                - GEPI.getNumOperands(),
                 GEPI.getNumOperands()) {
   Use *OL = OperandList;
   Use *GEPIOL = GEPI.OperandList;
@@ -1976,45 +1979,45 @@
   unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr/vector
 
   // Run through the possibilities ...
-  if (DestTy->isInteger()) {                      // Casting to integral
-    if (SrcTy->isInteger()) {                     // Casting from integral
+  if (DestTy->isInteger()) {                   // Casting to integral
+    if (SrcTy->isInteger()) {                  // Casting from integral
         return true;
-    } else if (SrcTy->isFloatingPoint()) {        // Casting from floating pt
+    } else if (SrcTy->isFloatingPoint()) {     // Casting from floating pt
       return true;
     } else if (const VectorType *PTy = dyn_cast<VectorType>(SrcTy)) {
-                                                  // Casting from vector
+                                               // Casting from vector
       return DestBits == PTy->getBitWidth();
-    } else {                                      // Casting from something else
+    } else {                                   // Casting from something else
       return isa<PointerType>(SrcTy);
     }
-  } else if (DestTy->isFloatingPoint()) {         // Casting to floating pt
-    if (SrcTy->isInteger()) {                     // Casting from integral
+  } else if (DestTy->isFloatingPoint()) {      // Casting to floating pt
+    if (SrcTy->isInteger()) {                  // Casting from integral
       return true;
-    } else if (SrcTy->isFloatingPoint()) {        // Casting from floating pt
+    } else if (SrcTy->isFloatingPoint()) {     // Casting from floating pt
       return true;
     } else if (const VectorType *PTy = dyn_cast<VectorType>(SrcTy)) {
-                                                  // Casting from vector
+                                               // Casting from vector
       return DestBits == PTy->getBitWidth();
-    } else {                                      // Casting from something else
+    } else {                                   // Casting from something else
       return false;
     }
   } else if (const VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
-                                                   // Casting to vector
+                                                // Casting to vector
     if (const VectorType *SrcPTy = dyn_cast<VectorType>(SrcTy)) {
-                                                   // Casting from vector
+                                                // Casting from vector
       return DestPTy->getBitWidth() == SrcPTy->getBitWidth();
-    } else {                                       // Casting from something else
+    } else {                                    // Casting from something else
       return DestPTy->getBitWidth() == SrcBits;
     }
-  } else if (isa<PointerType>(DestTy)) {           // Casting to pointer
-    if (isa<PointerType>(SrcTy)) {                 // Casting from pointer
+  } else if (isa<PointerType>(DestTy)) {        // Casting to pointer
+    if (isa<PointerType>(SrcTy)) {              // Casting from pointer
       return true;
-    } else if (SrcTy->isInteger()) {               // Casting from integral
+    } else if (SrcTy->isInteger()) {            // Casting from integral
       return true;
-    } else {                                       // Casting from something else
+    } else {                                    // Casting from something else
       return false;
     }
-  } else {                                         // Casting to something else
+  } else {                                      // Casting to something else
     return false;
   }
 }
@@ -2806,8 +2809,12 @@
 CastInst   *PtrToIntInst::clone() const { return new PtrToIntInst(*this); }
 CastInst   *IntToPtrInst::clone() const { return new IntToPtrInst(*this); }
 CastInst   *BitCastInst::clone()  const { return new BitCastInst(*this); }
-CallInst   *CallInst::clone()     const { return new(getNumOperands()) CallInst(*this); }
-SelectInst *SelectInst::clone()   const { return new(getNumOperands()) SelectInst(*this); }
+CallInst   *CallInst::clone()     const {
+  return new(getNumOperands()) CallInst(*this);
+}
+SelectInst *SelectInst::clone()   const {
+  return new(getNumOperands()) SelectInst(*this);
+}
 VAArgInst  *VAArgInst::clone()    const { return new VAArgInst(*this); }
 
 ExtractElementInst *ExtractElementInst::clone() const {
@@ -2820,10 +2827,16 @@
   return new ShuffleVectorInst(*this);
 }
 PHINode    *PHINode::clone()    const { return new PHINode(*this); }
-ReturnInst *ReturnInst::clone() const { return new(getNumOperands()) ReturnInst(*this); }
-BranchInst *BranchInst::clone() const { return new(getNumOperands()) BranchInst(*this); }
+ReturnInst *ReturnInst::clone() const {
+  return new(getNumOperands()) ReturnInst(*this);
+}
+BranchInst *BranchInst::clone() const {
+  return new(getNumOperands()) BranchInst(*this);
+}
 SwitchInst *SwitchInst::clone() const { return new SwitchInst(*this); }
-InvokeInst *InvokeInst::clone() const { return new(getNumOperands()) InvokeInst(*this); }
+InvokeInst *InvokeInst::clone() const {
+  return new(getNumOperands()) InvokeInst(*this);
+}
 UnwindInst *UnwindInst::clone() const { return new UnwindInst(); }
 UnreachableInst *UnreachableInst::clone() const { return new UnreachableInst();}
 GetResultInst *GetResultInst::clone() const { return new GetResultInst(*this); }

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Mangler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Mangler.cpp?rev=51034&r1=51033&r2=51034&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Mangler.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Mangler.cpp Tue May 13 07:37:25 2008
@@ -166,7 +166,8 @@
   } else {
     // If GV is external but the existing one is static, mangle the existing one
     if ((GV->hasExternalLinkage() || GV->hasDLLImportLinkage()) &&
-        !(ExistingValue->hasExternalLinkage() || ExistingValue->hasDLLImportLinkage())) {
+        !(ExistingValue->hasExternalLinkage()
+          || ExistingValue->hasDLLImportLinkage())) {
       MangledGlobals.insert(ExistingValue);
       ExistingValue = GV;
     } else if ((GV->hasExternalLinkage() ||
@@ -208,6 +209,8 @@
   std::map<std::string, GlobalValue*> Names;
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
     InsertName(I, Names);
-  for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
+  for (Module::global_iterator I = M.global_begin(), E = M.global_end();
+       I != E;
+       ++I)
     InsertName(I, Names);
 }

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/TypeSymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/TypeSymbolTable.cpp?rev=51034&r1=51033&r2=51034&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/TypeSymbolTable.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/TypeSymbolTable.cpp Tue May 13 07:37:25 2008
@@ -64,7 +64,9 @@
   // list...
   if (Result->isAbstract()) {
 #if DEBUG_ABSTYPE
-    cerr << "Removing abstract type from symtab" << Result->getDescription()<<"\n";
+    cerr << "Removing abstract type from symtab"
+         << Result->getDescription()
+         << "\n";
 #endif
     cast<DerivedType>(Result)->removeAbstractTypeUser(this);
   }

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp?rev=51034&r1=51033&r2=51034&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp Tue May 13 07:37:25 2008
@@ -1,4 +1,4 @@
-//===-- Use.cpp - Implement the Use class -------------------------------===//
+//===-- Use.cpp - Implement the Use class ---------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -122,7 +122,9 @@
 //===----------------------------------------------------------------------===//
 
 Use *User::allocHungoffUses(unsigned N) const {
-  Use *Begin = static_cast<Use*>(::operator new(sizeof(Use) * N + sizeof(AugmentedUse) - sizeof(Use)));
+  Use *Begin = static_cast<Use*>(::operator new(sizeof(Use) * N
+                                                + sizeof(AugmentedUse)
+                                                - sizeof(Use)));
   Use *End = Begin + N;
   static_cast<AugmentedUse&>(End[-1]).ref = addTag(this, tagOne);
   return Use::initTags(Begin, End);





More information about the llvm-commits mailing list