From 48fef599a428eefbd99a9669575bba1a07f0c614 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 20 Dec 2012 21:58:40 +0000 Subject: [PATCH] Whitespace and 80-column cleanup. llvm-svn: 170771 --- .../lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp | 6 +++--- llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h | 18 +++++++++--------- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 16 ++++++++-------- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 13 +++++++++---- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 3 ++- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp index 3f87bd23d56b..c1939992cd38 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp @@ -32,7 +32,7 @@ const char *DwarfAccelTable::Atom::AtomTypeString(enum AtomType AT) { case eAtomTypeTag: return "eAtomTypeTag"; case eAtomTypeNameFlags: return "eAtomTypeNameFlags"; case eAtomTypeTypeFlags: return "eAtomTypeTypeFlags"; - } + } llvm_unreachable("invalid AtomType!"); } @@ -155,7 +155,7 @@ void DwarfAccelTable::EmitHashes(AsmPrinter *Asm) { HE = Buckets[i].end(); HI != HE; ++HI) { Asm->OutStreamer.AddComment("Hash in Bucket " + Twine(i)); Asm->EmitInt32((*HI)->HashValue); - } + } } } @@ -258,7 +258,7 @@ void DwarfAccelTable::print(raw_ostream &O) { for (std::vector::const_iterator DI = Data.begin(), DE = Data.end(); DI != DE; ++DI) (*DI)->print(O); - + } #endif diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h index 7304f8537fec..9915bcaa9b69 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h @@ -51,7 +51,7 @@ // section contains all of the 32-bit hash values in contiguous memory, and // the offsets contain the offset into the data area for the particular // hash. -// +// // For a lookup example, we could hash a function name and take it modulo the // number of buckets giving us our bucket. From there we take the bucket value // as an index into the hashes table and look at each successive hash as long @@ -64,7 +64,7 @@ namespace llvm { class AsmPrinter; class DIE; class DwarfUnits; - + class DwarfAccelTable { enum HashFunctionType { @@ -81,7 +81,7 @@ class DwarfAccelTable { // Helper function to compute the number of buckets needed based on // the number of unique hashes. void ComputeBucketCount (void); - + struct TableHeader { uint32_t magic; // 'HASH' magic value to allow endian detection uint16_t version; // Version number. @@ -94,7 +94,7 @@ class DwarfAccelTable { // Also written to disk is the implementation specific header data. static const uint32_t MagicHash = 0x48415348; - + TableHeader (uint32_t data_len) : magic (MagicHash), version (1), hash_function (eHashFunctionDJB), bucket_count (0), hashes_count (0), header_data_len (data_len) @@ -123,7 +123,7 @@ public: // // uint32_t die_offset_base // uint32_t atom_count - // atom_count Atoms + // atom_count Atoms enum AtomType { eAtomTypeNULL = 0u, eAtomTypeDIEOffset = 1u, // DIE offset, check form for encoding @@ -138,12 +138,12 @@ public: enum TypeFlags { eTypeFlagClassMask = 0x0000000fu, - + // Always set for C++, only set for ObjC if this is the // @implementation for a class. eTypeFlagClassIsImplementation = ( 1u << 1 ) - }; - + }; + // Make these public so that they can be used as a general interface to // the class. struct Atom { @@ -265,7 +265,7 @@ private: typedef std::vector BucketList; BucketList Buckets; HashList Hashes; - + // Public Implementation public: DwarfAccelTable(ArrayRef); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 2a61efb13eb6..368234ba8627 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -110,7 +110,7 @@ public: &getAccelTypes() const { return AccelTypes; } - + /// hasContent - Return true if this compile unit has something to write out. /// bool hasContent() const { return !CUDie->getChildren().empty(); } @@ -137,12 +137,12 @@ public: std::vector > &DIEs = AccelTypes[Name]; DIEs.push_back(Die); } - + /// getDIE - Returns the debug information entry map slot for the /// specified debug variable. DIE *getDIE(const MDNode *N) { return MDNodeToDieMap.lookup(N); } - DIEBlock *getDIEBlock() { + DIEBlock *getDIEBlock() { return new (DIEValueAllocator) DIEBlock(); } @@ -185,7 +185,7 @@ public: /// addFlag - Add a flag that is true to the DIE. void addFlag(DIE *Die, unsigned Attribute); - + /// addUInt - Add an unsigned integer attribute data and value. /// void addUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer); @@ -211,7 +211,7 @@ public: /// addDIEEntry - Add a DIE attribute data and value. /// void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry); - + /// addBlock - Add block data. /// void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block); @@ -264,7 +264,7 @@ public: void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute, const MachineLocation &Location); - /// addVariableAddress - Add DW_AT_location attribute for a + /// addVariableAddress - Add DW_AT_location attribute for a /// DbgVariable based on provided MachineLocation. void addVariableAddress(DbgVariable *&DV, DIE *Die, MachineLocation Location); @@ -286,7 +286,7 @@ public: /// given DIType. DIE *getOrCreateTypeDIE(const MDNode *N); - /// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE + /// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE /// for the given DITemplateTypeParameter. DIE *getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP); @@ -319,7 +319,7 @@ public: void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy); /// constructArrayTypeDIE - Construct array type DIE from DICompositeType. - void constructArrayTypeDIE(DIE &Buffer, + void constructArrayTypeDIE(DIE &Buffer, DICompositeType *CTy); /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator. diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 2a9c2ff23288..4867bb817711 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -615,7 +615,8 @@ unsigned DwarfDebug::getOrCreateSourceID(StringRef FileName, return SrcId; } -// Create new CompileUnit for the given metadata node with tag DW_TAG_compile_unit. +// Create new CompileUnit for the given metadata node with tag +// DW_TAG_compile_unit. CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { DICompileUnit DIUnit(N); StringRef FN = DIUnit.getFilename(); @@ -1962,7 +1963,8 @@ void DwarfDebug::emitAccelNames() { AT.Emit(Asm, SectionBegin, &InfoHolder); } -// Emit objective C classes and categories into a hashed accelerator table section. +// Emit objective C classes and categories into a hashed accelerator table +// section. void DwarfDebug::emitAccelObjC() { DwarfAccelTable AT(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeDIEOffset, dwarf::DW_FORM_data4)); @@ -2120,7 +2122,9 @@ void DwarfDebug::emitDebugStr() { StringMapEntry >*>, 64> Entries; for (StringMap >::iterator - I = InfoHolder.getStringPool()->begin(), E = InfoHolder.getStringPool()->end(); I != E; ++I) + I = InfoHolder.getStringPool()->begin(), + E = InfoHolder.getStringPool()->end(); + I != E; ++I) Entries.push_back(std::make_pair(I->second.second, &*I)); array_pod_sort(Entries.begin(), Entries.end()); @@ -2433,5 +2437,6 @@ void DwarfDebug::emitDebugInfoDWO() { // abbreviations for the .debug_info.dwo section. void DwarfDebug::emitDebugAbbrevDWO() { assert(useSplitDwarf() && "No split dwarf?"); - emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevDWOSection(), &Abbreviations); + emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevDWOSection(), + &Abbreviations); } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 71e78c221176..870b588cf7c7 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -315,7 +315,8 @@ class DwarfDebug { DenseMap > InlineInfo; SmallVector InlinedSPNodes; - // This is a collection of subprogram MDNodes that are processed to create DIEs. + // This is a collection of subprogram MDNodes that are processed to + // create DIEs. SmallPtrSet ProcessedSPNodes; // Maps instruction with label emitted before instruction.