mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Whitespace and 80-column cleanup.
llvm-svn: 170771
This commit is contained in:
parent
622a4d5b97
commit
537c3f1bc9
@ -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<HashData*>::const_iterator
|
||||
DI = Data.begin(), DE = Data.end(); DI != DE; ++DI)
|
||||
(*DI)->print(O);
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -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<HashList> BucketList;
|
||||
BucketList Buckets;
|
||||
HashList Hashes;
|
||||
|
||||
|
||||
// Public Implementation
|
||||
public:
|
||||
DwarfAccelTable(ArrayRef<DwarfAccelTable::Atom>);
|
||||
|
@ -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<std::pair<DIE*, unsigned > > &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.
|
||||
|
@ -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<std::pair<MCSymbol*, unsigned> >*>, 64> Entries;
|
||||
|
||||
for (StringMap<std::pair<MCSymbol*, unsigned> >::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);
|
||||
}
|
||||
|
@ -315,7 +315,8 @@ class DwarfDebug {
|
||||
DenseMap<const MDNode *, SmallVector<InlineInfoLabels, 4> > InlineInfo;
|
||||
SmallVector<const MDNode *, 4> 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<const MDNode *, 16> ProcessedSPNodes;
|
||||
|
||||
// Maps instruction with label emitted before instruction.
|
||||
|
Loading…
Reference in New Issue
Block a user