mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Make types and namespaces take multiple DIEs for the accelerator tables
as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
169698095d
commit
8bd36eafca
@ -64,8 +64,8 @@ class CompileUnit {
|
|||||||
///
|
///
|
||||||
StringMap<std::vector<DIE*> > AccelNames;
|
StringMap<std::vector<DIE*> > AccelNames;
|
||||||
StringMap<std::vector<DIE*> > AccelObjC;
|
StringMap<std::vector<DIE*> > AccelObjC;
|
||||||
StringMap<DIE*> AccelNamespace;
|
StringMap<std::vector<DIE*> > AccelNamespace;
|
||||||
StringMap<DIE*> AccelTypes;
|
StringMap<std::vector<DIE*> > AccelTypes;
|
||||||
|
|
||||||
/// DIEBlocks - A list of all the DIEBlocks in use.
|
/// DIEBlocks - A list of all the DIEBlocks in use.
|
||||||
std::vector<DIEBlock *> DIEBlocks;
|
std::vector<DIEBlock *> DIEBlocks;
|
||||||
@ -90,8 +90,12 @@ public:
|
|||||||
const StringMap<std::vector<DIE*> > &getAccelObjC() const {
|
const StringMap<std::vector<DIE*> > &getAccelObjC() const {
|
||||||
return AccelObjC;
|
return AccelObjC;
|
||||||
}
|
}
|
||||||
const StringMap<DIE*> &getAccelNamespace() const { return AccelNamespace; }
|
const StringMap<std::vector<DIE*> > &getAccelNamespace() const {
|
||||||
const StringMap<DIE*> &getAccelTypes() const { return AccelTypes; }
|
return AccelNamespace;
|
||||||
|
}
|
||||||
|
const StringMap<std::vector<DIE*> > &getAccelTypes() const {
|
||||||
|
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.
|
||||||
///
|
///
|
||||||
@ -112,10 +116,12 @@ public:
|
|||||||
DIEs.push_back(Die);
|
DIEs.push_back(Die);
|
||||||
}
|
}
|
||||||
void addAccelNamespace(StringRef Name, DIE *Die) {
|
void addAccelNamespace(StringRef Name, DIE *Die) {
|
||||||
AccelNamespace[Name] = Die;
|
std::vector<DIE*> &DIEs = AccelNamespace[Name];
|
||||||
|
DIEs.push_back(Die);
|
||||||
}
|
}
|
||||||
void addAccelType(StringRef Name, DIE *Die) {
|
void addAccelType(StringRef Name, DIE *Die) {
|
||||||
AccelTypes[Name] = Die;
|
std::vector<DIE*> &DIEs = AccelTypes[Name];
|
||||||
|
DIEs.push_back(Die);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getDIE - Returns the debug information entry map slot for the
|
/// getDIE - Returns the debug information entry map slot for the
|
||||||
|
@ -1823,12 +1823,14 @@ void DwarfDebug::emitAccelNamespaces() {
|
|||||||
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
|
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
|
||||||
E = CUMap.end(); I != E; ++I) {
|
E = CUMap.end(); I != E; ++I) {
|
||||||
CompileUnit *TheCU = I->second;
|
CompileUnit *TheCU = I->second;
|
||||||
const StringMap<DIE*> &Names = TheCU->getAccelNamespace();
|
const StringMap<std::vector<DIE*> > &Names = TheCU->getAccelNamespace();
|
||||||
for (StringMap<DIE*>::const_iterator
|
for (StringMap<std::vector<DIE*> >::const_iterator
|
||||||
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
|
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
|
||||||
const char *Name = GI->getKeyData();
|
const char *Name = GI->getKeyData();
|
||||||
DIE *Entity = GI->second;
|
std::vector<DIE *> Entities = GI->second;
|
||||||
AT.AddName(Name, Entity);
|
for (std::vector<DIE *>::const_iterator DI = Entities.begin(),
|
||||||
|
DE = Entities.end(); DI != DE; ++DI)
|
||||||
|
AT.AddName(Name, (*DI));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1849,12 +1851,14 @@ void DwarfDebug::emitAccelTypes() {
|
|||||||
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
|
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
|
||||||
E = CUMap.end(); I != E; ++I) {
|
E = CUMap.end(); I != E; ++I) {
|
||||||
CompileUnit *TheCU = I->second;
|
CompileUnit *TheCU = I->second;
|
||||||
const StringMap<DIE*> &Names = TheCU->getAccelTypes();
|
const StringMap<std::vector<DIE*> > &Names = TheCU->getAccelTypes();
|
||||||
for (StringMap<DIE*>::const_iterator
|
for (StringMap<std::vector<DIE*> >::const_iterator
|
||||||
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
|
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
|
||||||
const char *Name = GI->getKeyData();
|
const char *Name = GI->getKeyData();
|
||||||
DIE *Entity = GI->second;
|
std::vector<DIE *> Entities = GI->second;
|
||||||
AT.AddName(Name, Entity);
|
for (std::vector<DIE *>::const_iterator DI = Entities.begin(),
|
||||||
|
DE= Entities.end(); DI !=DE; ++DI)
|
||||||
|
AT.AddName(Name, (*DI));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user