mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Whitespace and 80-column cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -32,7 +32,7 @@ const char *DwarfAccelTable::Atom::AtomTypeString(enum AtomType AT) {
|
|||||||
case eAtomTypeTag: return "eAtomTypeTag";
|
case eAtomTypeTag: return "eAtomTypeTag";
|
||||||
case eAtomTypeNameFlags: return "eAtomTypeNameFlags";
|
case eAtomTypeNameFlags: return "eAtomTypeNameFlags";
|
||||||
case eAtomTypeTypeFlags: return "eAtomTypeTypeFlags";
|
case eAtomTypeTypeFlags: return "eAtomTypeTypeFlags";
|
||||||
}
|
}
|
||||||
llvm_unreachable("invalid AtomType!");
|
llvm_unreachable("invalid AtomType!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ void DwarfAccelTable::EmitHashes(AsmPrinter *Asm) {
|
|||||||
HE = Buckets[i].end(); HI != HE; ++HI) {
|
HE = Buckets[i].end(); HI != HE; ++HI) {
|
||||||
Asm->OutStreamer.AddComment("Hash in Bucket " + Twine(i));
|
Asm->OutStreamer.AddComment("Hash in Bucket " + Twine(i));
|
||||||
Asm->EmitInt32((*HI)->HashValue);
|
Asm->EmitInt32((*HI)->HashValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ void DwarfAccelTable::print(raw_ostream &O) {
|
|||||||
for (std::vector<HashData*>::const_iterator
|
for (std::vector<HashData*>::const_iterator
|
||||||
DI = Data.begin(), DE = Data.end(); DI != DE; ++DI)
|
DI = Data.begin(), DE = Data.end(); DI != DE; ++DI)
|
||||||
(*DI)->print(O);
|
(*DI)->print(O);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
// section contains all of the 32-bit hash values in contiguous memory, and
|
// 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
|
// the offsets contain the offset into the data area for the particular
|
||||||
// hash.
|
// hash.
|
||||||
//
|
//
|
||||||
// For a lookup example, we could hash a function name and take it modulo the
|
// 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
|
// 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
|
// as an index into the hashes table and look at each successive hash as long
|
||||||
@@ -64,7 +64,7 @@ namespace llvm {
|
|||||||
class AsmPrinter;
|
class AsmPrinter;
|
||||||
class DIE;
|
class DIE;
|
||||||
class DwarfUnits;
|
class DwarfUnits;
|
||||||
|
|
||||||
class DwarfAccelTable {
|
class DwarfAccelTable {
|
||||||
|
|
||||||
enum HashFunctionType {
|
enum HashFunctionType {
|
||||||
@@ -81,7 +81,7 @@ class DwarfAccelTable {
|
|||||||
// Helper function to compute the number of buckets needed based on
|
// Helper function to compute the number of buckets needed based on
|
||||||
// the number of unique hashes.
|
// the number of unique hashes.
|
||||||
void ComputeBucketCount (void);
|
void ComputeBucketCount (void);
|
||||||
|
|
||||||
struct TableHeader {
|
struct TableHeader {
|
||||||
uint32_t magic; // 'HASH' magic value to allow endian detection
|
uint32_t magic; // 'HASH' magic value to allow endian detection
|
||||||
uint16_t version; // Version number.
|
uint16_t version; // Version number.
|
||||||
@@ -94,7 +94,7 @@ class DwarfAccelTable {
|
|||||||
// Also written to disk is the implementation specific header data.
|
// Also written to disk is the implementation specific header data.
|
||||||
|
|
||||||
static const uint32_t MagicHash = 0x48415348;
|
static const uint32_t MagicHash = 0x48415348;
|
||||||
|
|
||||||
TableHeader (uint32_t data_len) :
|
TableHeader (uint32_t data_len) :
|
||||||
magic (MagicHash), version (1), hash_function (eHashFunctionDJB),
|
magic (MagicHash), version (1), hash_function (eHashFunctionDJB),
|
||||||
bucket_count (0), hashes_count (0), header_data_len (data_len)
|
bucket_count (0), hashes_count (0), header_data_len (data_len)
|
||||||
@@ -123,7 +123,7 @@ public:
|
|||||||
//
|
//
|
||||||
// uint32_t die_offset_base
|
// uint32_t die_offset_base
|
||||||
// uint32_t atom_count
|
// uint32_t atom_count
|
||||||
// atom_count Atoms
|
// atom_count Atoms
|
||||||
enum AtomType {
|
enum AtomType {
|
||||||
eAtomTypeNULL = 0u,
|
eAtomTypeNULL = 0u,
|
||||||
eAtomTypeDIEOffset = 1u, // DIE offset, check form for encoding
|
eAtomTypeDIEOffset = 1u, // DIE offset, check form for encoding
|
||||||
@@ -138,12 +138,12 @@ public:
|
|||||||
|
|
||||||
enum TypeFlags {
|
enum TypeFlags {
|
||||||
eTypeFlagClassMask = 0x0000000fu,
|
eTypeFlagClassMask = 0x0000000fu,
|
||||||
|
|
||||||
// Always set for C++, only set for ObjC if this is the
|
// Always set for C++, only set for ObjC if this is the
|
||||||
// @implementation for a class.
|
// @implementation for a class.
|
||||||
eTypeFlagClassIsImplementation = ( 1u << 1 )
|
eTypeFlagClassIsImplementation = ( 1u << 1 )
|
||||||
};
|
};
|
||||||
|
|
||||||
// Make these public so that they can be used as a general interface to
|
// Make these public so that they can be used as a general interface to
|
||||||
// the class.
|
// the class.
|
||||||
struct Atom {
|
struct Atom {
|
||||||
@@ -265,7 +265,7 @@ private:
|
|||||||
typedef std::vector<HashList> BucketList;
|
typedef std::vector<HashList> BucketList;
|
||||||
BucketList Buckets;
|
BucketList Buckets;
|
||||||
HashList Hashes;
|
HashList Hashes;
|
||||||
|
|
||||||
// Public Implementation
|
// Public Implementation
|
||||||
public:
|
public:
|
||||||
DwarfAccelTable(ArrayRef<DwarfAccelTable::Atom>);
|
DwarfAccelTable(ArrayRef<DwarfAccelTable::Atom>);
|
||||||
|
@@ -110,7 +110,7 @@ public:
|
|||||||
&getAccelTypes() const {
|
&getAccelTypes() const {
|
||||||
return AccelTypes;
|
return AccelTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hasContent - Return true if this compile unit has something to write out.
|
/// hasContent - Return true if this compile unit has something to write out.
|
||||||
///
|
///
|
||||||
bool hasContent() const { return !CUDie->getChildren().empty(); }
|
bool hasContent() const { return !CUDie->getChildren().empty(); }
|
||||||
@@ -137,12 +137,12 @@ public:
|
|||||||
std::vector<std::pair<DIE*, unsigned > > &DIEs = AccelTypes[Name];
|
std::vector<std::pair<DIE*, unsigned > > &DIEs = AccelTypes[Name];
|
||||||
DIEs.push_back(Die);
|
DIEs.push_back(Die);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getDIE - Returns the debug information entry map slot for the
|
/// getDIE - Returns the debug information entry map slot for the
|
||||||
/// specified debug variable.
|
/// specified debug variable.
|
||||||
DIE *getDIE(const MDNode *N) { return MDNodeToDieMap.lookup(N); }
|
DIE *getDIE(const MDNode *N) { return MDNodeToDieMap.lookup(N); }
|
||||||
|
|
||||||
DIEBlock *getDIEBlock() {
|
DIEBlock *getDIEBlock() {
|
||||||
return new (DIEValueAllocator) DIEBlock();
|
return new (DIEValueAllocator) DIEBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
|
|
||||||
/// addFlag - Add a flag that is true to the DIE.
|
/// addFlag - Add a flag that is true to the DIE.
|
||||||
void addFlag(DIE *Die, unsigned Attribute);
|
void addFlag(DIE *Die, unsigned Attribute);
|
||||||
|
|
||||||
/// addUInt - Add an unsigned integer attribute data and value.
|
/// addUInt - Add an unsigned integer attribute data and value.
|
||||||
///
|
///
|
||||||
void addUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer);
|
void addUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer);
|
||||||
@@ -211,7 +211,7 @@ public:
|
|||||||
/// addDIEEntry - Add a DIE attribute data and value.
|
/// addDIEEntry - Add a DIE attribute data and value.
|
||||||
///
|
///
|
||||||
void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry);
|
void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry);
|
||||||
|
|
||||||
/// addBlock - Add block data.
|
/// addBlock - Add block data.
|
||||||
///
|
///
|
||||||
void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block);
|
void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block);
|
||||||
@@ -264,7 +264,7 @@ public:
|
|||||||
void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute,
|
void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute,
|
||||||
const MachineLocation &Location);
|
const MachineLocation &Location);
|
||||||
|
|
||||||
/// addVariableAddress - Add DW_AT_location attribute for a
|
/// addVariableAddress - Add DW_AT_location attribute for a
|
||||||
/// DbgVariable based on provided MachineLocation.
|
/// DbgVariable based on provided MachineLocation.
|
||||||
void addVariableAddress(DbgVariable *&DV, DIE *Die, MachineLocation Location);
|
void addVariableAddress(DbgVariable *&DV, DIE *Die, MachineLocation Location);
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ public:
|
|||||||
/// given DIType.
|
/// given DIType.
|
||||||
DIE *getOrCreateTypeDIE(const MDNode *N);
|
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.
|
/// for the given DITemplateTypeParameter.
|
||||||
DIE *getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP);
|
DIE *getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP);
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ public:
|
|||||||
void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy);
|
void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy);
|
||||||
|
|
||||||
/// constructArrayTypeDIE - Construct array type DIE from DICompositeType.
|
/// constructArrayTypeDIE - Construct array type DIE from DICompositeType.
|
||||||
void constructArrayTypeDIE(DIE &Buffer,
|
void constructArrayTypeDIE(DIE &Buffer,
|
||||||
DICompositeType *CTy);
|
DICompositeType *CTy);
|
||||||
|
|
||||||
/// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
|
/// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
|
||||||
|
@@ -615,7 +615,8 @@ unsigned DwarfDebug::getOrCreateSourceID(StringRef FileName,
|
|||||||
return SrcId;
|
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) {
|
CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
|
||||||
DICompileUnit DIUnit(N);
|
DICompileUnit DIUnit(N);
|
||||||
StringRef FN = DIUnit.getFilename();
|
StringRef FN = DIUnit.getFilename();
|
||||||
@@ -1962,7 +1963,8 @@ void DwarfDebug::emitAccelNames() {
|
|||||||
AT.Emit(Asm, SectionBegin, &InfoHolder);
|
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() {
|
void DwarfDebug::emitAccelObjC() {
|
||||||
DwarfAccelTable AT(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeDIEOffset,
|
DwarfAccelTable AT(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeDIEOffset,
|
||||||
dwarf::DW_FORM_data4));
|
dwarf::DW_FORM_data4));
|
||||||
@@ -2120,7 +2122,9 @@ void DwarfDebug::emitDebugStr() {
|
|||||||
StringMapEntry<std::pair<MCSymbol*, unsigned> >*>, 64> Entries;
|
StringMapEntry<std::pair<MCSymbol*, unsigned> >*>, 64> Entries;
|
||||||
|
|
||||||
for (StringMap<std::pair<MCSymbol*, unsigned> >::iterator
|
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));
|
Entries.push_back(std::make_pair(I->second.second, &*I));
|
||||||
|
|
||||||
array_pod_sort(Entries.begin(), Entries.end());
|
array_pod_sort(Entries.begin(), Entries.end());
|
||||||
@@ -2433,5 +2437,6 @@ void DwarfDebug::emitDebugInfoDWO() {
|
|||||||
// abbreviations for the .debug_info.dwo section.
|
// abbreviations for the .debug_info.dwo section.
|
||||||
void DwarfDebug::emitDebugAbbrevDWO() {
|
void DwarfDebug::emitDebugAbbrevDWO() {
|
||||||
assert(useSplitDwarf() && "No split dwarf?");
|
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;
|
DenseMap<const MDNode *, SmallVector<InlineInfoLabels, 4> > InlineInfo;
|
||||||
SmallVector<const MDNode *, 4> InlinedSPNodes;
|
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;
|
SmallPtrSet<const MDNode *, 16> ProcessedSPNodes;
|
||||||
|
|
||||||
// Maps instruction with label emitted before instruction.
|
// Maps instruction with label emitted before instruction.
|
||||||
|
Reference in New Issue
Block a user