[llvm-commits] [llvm] r63660 - in /llvm/trunk/lib/CodeGen: AsmPrinter/DwarfWriter.cpp GCStrategy.cpp

Bill Wendling isanbard at gmail.com
Tue Feb 3 13:17:20 PST 2009


Author: void
Date: Tue Feb  3 15:17:20 2009
New Revision: 63660

URL: http://llvm.org/viewvc/llvm-project?rev=63660&view=rev
Log:
Whitespace and comment changes. No functionality change.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
    llvm/trunk/lib/CodeGen/GCStrategy.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=63660&r1=63659&r2=63660&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Tue Feb  3 15:17:20 2009
@@ -54,9 +54,9 @@
 
 /// Configuration values for initial hash set sizes (log2).
 ///
-static const unsigned InitDiesSetSize          = 9; // 512
-static const unsigned InitAbbreviationsSetSize = 9; // 512
-static const unsigned InitValuesSetSize        = 9; // 512
+static const unsigned InitDiesSetSize          = 9; // log2(512)
+static const unsigned InitAbbreviationsSetSize = 9; // log2(512)
+static const unsigned InitValuesSetSize        = 9; // log2(512)
 
 //===----------------------------------------------------------------------===//
 /// Forward declarations.
@@ -855,9 +855,7 @@
 /// Dwarf - Emits general Dwarf directives.
 ///
 class Dwarf {
-
 protected:
-
   //===--------------------------------------------------------------------===//
   // Core attributes used by the Dwarf writer.
   //
@@ -918,7 +916,6 @@
   }
 
 public:
-
   //===--------------------------------------------------------------------===//
   // Accessors.
   //
@@ -1166,7 +1163,7 @@
   unsigned LabelID;                     // Label in code ID number.
 public:
   SrcLineInfo(unsigned L, unsigned C, unsigned S, unsigned I)
-  : Line(L), Column(C), SourceID(S), LabelID(I) {}
+    : Line(L), Column(C), SourceID(S), LabelID(I) {}
   
   // Accessors
   unsigned getLine()     const { return Line; }
@@ -1175,7 +1172,6 @@
   unsigned getLabelID()  const { return LabelID; }
 };
 
-
 //===----------------------------------------------------------------------===//
 /// SrcFileInfo - This class is used to track source information.
 ///
@@ -1207,10 +1203,8 @@
 /// DbgVariable - This class is used to track local variable information.
 ///
 class DbgVariable {
-private:
   DIVariable Var;                   // Variable Descriptor.
   unsigned FrameIndex;               // Variable frame index.
-
 public:
   DbgVariable(DIVariable V, unsigned I) : Var(V), FrameIndex(I)  {}
   
@@ -1223,7 +1217,6 @@
 /// DbgScope - This class is used to track scope information.
 ///
 class DbgScope {
-private:
   DbgScope *Parent;                   // Parent to this scope.
   DIDescriptor Desc;                  // Debug info descriptor for scope.
                                       // Either subprogram or block.
@@ -1231,7 +1224,6 @@
   unsigned EndLabelID;                // Label ID of the end of scope.
   SmallVector<DbgScope *, 4> Scopes;  // Scopes defined in scope.
   SmallVector<DbgVariable *, 8> Variables;// Variables declared in scope.
-  
 public:
   DbgScope(DbgScope *P, DIDescriptor D)
   : Parent(P), Desc(D), StartLabelID(0), EndLabelID(0), Scopes(), Variables()
@@ -1264,8 +1256,6 @@
 /// DwarfDebug - Emits Dwarf debug directives.
 ///
 class DwarfDebug : public Dwarf {
-
-private:
   //===--------------------------------------------------------------------===//
   // Attributes used to construct specific Dwarf sections.
   //
@@ -1641,7 +1631,7 @@
     else if (Ty.isDerivedType(Ty.getTag()))
       ConstructTypeDIE(DW_Unit, Buffer, DIDerivedType(Ty.getGV()));
     else {
-      assert (Ty.isCompositeType(Ty.getTag()) && "Unknown kind of DIType");
+      assert(Ty.isCompositeType(Ty.getTag()) && "Unknown kind of DIType");
       ConstructTypeDIE(DW_Unit, Buffer, DICompositeType(Ty.getGV()));
     }
     
@@ -1656,8 +1646,7 @@
       Die->AddChild(Child);
       Buffer.Detach();
       SetDIEntry(Slot, Child);
-    }
-    else {
+    } else {
       Die = DW_Unit->AddDie(Buffer);
       SetDIEntry(Slot, Die);
     }
@@ -1806,8 +1795,8 @@
     }
   }
   
-  // ConstructSubrangeDIE - Construct subrange DIE from DISubrange.
-  void ConstructSubrangeDIE (DIE &Buffer, DISubrange SR, DIE *IndexTy) {
+  /// ConstructSubrangeDIE - Construct subrange DIE from DISubrange.
+  void ConstructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy) {
     int64_t L = SR.getLo();
     int64_t H = SR.getHi();
     DIE *DW_Subrange = new DIE(DW_TAG_subrange_type);
@@ -1845,8 +1834,7 @@
     }
   }
 
-  /// ConstructEnumTypeDIE - Construct enum type DIE from 
-  /// DIEnumerator.
+  /// ConstructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
   DIE *ConstructEnumTypeDIE(CompileUnit *DW_Unit, DIEnumerator *ETy) {
 
     DIE *Enumerator = new DIE(DW_TAG_enumerator);
@@ -1857,7 +1845,7 @@
   }
 
   /// CreateGlobalVariableDIE - Create new DIE using GV.
-  DIE *CreateGlobalVariableDIE(CompileUnit *DW_Unit, const DIGlobalVariable &GV) 
+  DIE *CreateGlobalVariableDIE(CompileUnit *DW_Unit, const DIGlobalVariable &GV)
   {
     DIE *GVDie = new DIE(DW_TAG_variable);
     AddString(GVDie, DW_AT_name, DW_FORM_string, GV.getName());
@@ -2101,9 +2089,9 @@
     std::string SPName = "llvm.dbg.subprograms";
     std::vector<GlobalVariable*> Result;
     getGlobalVariablesUsing(*M, SPName, Result);
+
     for (std::vector<GlobalVariable *>::iterator I = Result.begin(),
            E = Result.end(); I != E; ++I) {
-
       DISubprogram SPD(*I);
 
       if (SPD.getName() == MF->getFunction()->getName()) {
@@ -3183,8 +3171,6 @@
 /// DwarfException - Emits Dwarf exception handling directives.
 ///
 class DwarfException : public Dwarf  {
-
-private:
   struct FunctionEHFrameInfo {
     std::string FnName;
     unsigned Number;

Modified: llvm/trunk/lib/CodeGen/GCStrategy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCStrategy.cpp?rev=63660&r1=63659&r2=63660&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/GCStrategy.cpp (original)
+++ llvm/trunk/lib/CodeGen/GCStrategy.cpp Tue Feb  3 15:17:20 2009
@@ -329,6 +329,7 @@
 unsigned MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB, 
                                      MachineBasicBlock::iterator MI) const {
   unsigned Label = MMI->NextLabelID();
+  // N.B. we assume that MI is *not* equal to the "end()" iterator.
   BuildMI(MBB, MI, MI->getDebugLoc(),
           TII->get(TargetInstrInfo::GC_LABEL)).addImm(Label);
   return Label;





More information about the llvm-commits mailing list