[cfe-commits] r58488 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.cpp CGDebugInfo.h

Daniel Dunbar daniel at zuster.org
Thu Oct 30 20:54:30 PDT 2008


Author: ddunbar
Date: Thu Oct 30 22:54:29 2008
New Revision: 58488

URL: http://llvm.org/viewvc/llvm-project?rev=58488&view=rev
Log:
Formatting tweaks.
 - No functionality change.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.h

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=58488&r1=58487&r2=58488&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Oct 30 22:54:29 2008
@@ -203,7 +203,8 @@
     FromTy = getOrCreateType(type, Unit);
   }
 
-  // No need to fill in the Name, Line, Size, Alignment, Offset in case of        // CVR derived types.
+  // No need to fill in the Name, Line, Size, Alignment, Offset in case of
+  // CVR derived types.
   DTy->setContext(Unit);
   DTy->setFromType(FromTy);
 
@@ -378,9 +379,9 @@
 CGDebugInfo::getOrCreateRecordType(QualType type, llvm::CompileUnitDesc *Unit)
 {
   llvm::CompositeTypeDesc *RecType;
-  if(type->isStructureType())
+  if (type->isStructureType())
     RecType = new llvm::CompositeTypeDesc(llvm::dwarf::DW_TAG_structure_type);
-  else if(type->isUnionType())
+  else if (type->isUnionType())
     RecType = new llvm::CompositeTypeDesc(llvm::dwarf::DW_TAG_union_type);
   else
     return NULL;
@@ -407,7 +408,7 @@
   }
 
   // Fill in the blanks.
-  if(RecType) {
+  if (RecType) {
     RecType->setContext(Unit);
     RecType->setName(RecDecl->getName());
     RecType->setFile(getOrCreateCompileUnit(RecDecl->getLocation()));
@@ -416,7 +417,7 @@
     RecType->setAlign(RL.getAlignment());
     RecType->setOffset(0);
   }
-  return(RecType);
+  return RecType;
 }
 
 /// getOrCreateEnumType - get Enum type.
@@ -427,7 +428,7 @@
     = new llvm::CompositeTypeDesc(llvm::dwarf::DW_TAG_enumeration_type);
 
   EnumType *EType = dyn_cast<EnumType>(type);
-  if (!EType) return(NULL);
+  if (!EType) return NULL;
 
   EnumDecl *EDecl = EType->getDecl();
   SourceManager &SM = M->getContext().getSourceManager();
@@ -549,7 +550,7 @@
   }
 
   // Work out details of type.
-  switch(type->getTypeClass()) {
+  switch (type->getTypeClass()) {
     case Type::Complex:
     case Type::Reference:
     case Type::Vector:
@@ -561,9 +562,7 @@
     case Type::TypeOfExp:
     case Type::TypeOfTyp:
     default:
-    {
       return NULL;
-    }
 
     case Type::TypeName:
       Slot = getOrCreateTypedefType(type, Unit);

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=58488&r1=58487&r2=58488&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Thu Oct 30 22:54:29 2008
@@ -1,4 +1,4 @@
-//===--- CGDebugInfo.h - DebugInfo for LLVM CodeGen -----------------------===//
+//===--- CGDebugInfo.h - DebugInfo for LLVM CodeGen -------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -81,21 +81,21 @@
   llvm::TypeDesc *getOrCreateCVRType(QualType type, 
                                      llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateBuiltinType(QualType type, 
-                                     llvm::CompileUnitDesc *unit);
+                                         llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateTypedefType(QualType type, 
-                                     llvm::CompileUnitDesc *unit);
+                                         llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreatePointerType(QualType type, 
-                                     llvm::CompileUnitDesc *unit);
+                                         llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateFunctionType(QualType type, 
-                                     llvm::CompileUnitDesc *unit);
+                                          llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateRecordType(QualType type,
-                                     llvm::CompileUnitDesc *unit);
+                                        llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateEnumType(QualType type,
-                                     llvm::CompileUnitDesc *unit);
+                                      llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateTaggedType(QualType type,
-                                     llvm::CompileUnitDesc *unit);
+                                        llvm::CompileUnitDesc *unit);
   llvm::TypeDesc *getOrCreateArrayType(QualType type,
-                                     llvm::CompileUnitDesc *unit);
+                                       llvm::CompileUnitDesc *unit);
 
 public:
   CGDebugInfo(CodeGenModule *m);





More information about the cfe-commits mailing list