]> granicus.if.org Git - clang/commitdiff
Formatting tweaks.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 31 Oct 2008 03:54:29 +0000 (03:54 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 31 Oct 2008 03:54:29 +0000 (03:54 +0000)
 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58488 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h

index 4283dd4eaf3c654cce2822899243e52ef986537c..64ce8f70e8ed95d34ffad97a27a73c29a5c93868 100644 (file)
@@ -203,7 +203,8 @@ CGDebugInfo::getOrCreateCVRType(QualType type, llvm::CompileUnitDesc *Unit)
     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 @@ llvm::TypeDesc *
 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 @@ CGDebugInfo::getOrCreateRecordType(QualType type, llvm::CompileUnitDesc *Unit)
   }
 
   // Fill in the blanks.
-  if(RecType) {
+  if (RecType) {
     RecType->setContext(Unit);
     RecType->setName(RecDecl->getName());
     RecType->setFile(getOrCreateCompileUnit(RecDecl->getLocation()));
@@ -416,7 +417,7 @@ CGDebugInfo::getOrCreateRecordType(QualType type, llvm::CompileUnitDesc *Unit)
     RecType->setAlign(RL.getAlignment());
     RecType->setOffset(0);
   }
-  return(RecType);
+  return RecType;
 }
 
 /// getOrCreateEnumType - get Enum type.
@@ -427,7 +428,7 @@ CGDebugInfo::getOrCreateEnumType(QualType type, llvm::CompileUnitDesc *Unit)
     = 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 @@ CGDebugInfo::getOrCreateType(QualType type, llvm::CompileUnitDesc *Unit)
   }
 
   // Work out details of type.
-  switch(type->getTypeClass()) {
+  switch (type->getTypeClass()) {
     case Type::Complex:
     case Type::Reference:
     case Type::Vector:
@@ -561,9 +562,7 @@ CGDebugInfo::getOrCreateType(QualType type, llvm::CompileUnitDesc *Unit)
     case Type::TypeOfExp:
     case Type::TypeOfTyp:
     default:
-    {
       return NULL;
-    }
 
     case Type::TypeName:
       Slot = getOrCreateTypedefType(type, Unit);
index 07d5b54b3d9a8cd531f6c43cc8a0318c42e48511..28834eee086b79a6bb1fa16525fa96903241571f 100644 (file)
@@ -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 @@ private:
   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);