mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Minor code cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1795616930
commit
39dd696282
@ -67,36 +67,25 @@ class VISIBILITY_HIDDEN CompileUnit {
|
|||||||
FoldingSet<DIE> DiesSet;
|
FoldingSet<DIE> DiesSet;
|
||||||
public:
|
public:
|
||||||
CompileUnit(unsigned I, DIE *D)
|
CompileUnit(unsigned I, DIE *D)
|
||||||
: ID(I), Die(D), GVToDieMap(),
|
: ID(I), Die(D), DiesSet(InitDiesSetSize) {}
|
||||||
GVToDIEEntryMap(), Globals(), DiesSet(InitDiesSetSize)
|
~CompileUnit() { delete Die; }
|
||||||
{}
|
|
||||||
|
|
||||||
~CompileUnit() {
|
|
||||||
delete Die;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors.
|
// Accessors.
|
||||||
unsigned getID() const { return ID; }
|
unsigned getID() const { return ID; }
|
||||||
DIE* getDie() const { return Die; }
|
DIE* getDie() const { return Die; }
|
||||||
StringMap<DIE*> &getGlobals() { return Globals; }
|
StringMap<DIE*> &getGlobals() { return Globals; }
|
||||||
|
|
||||||
/// 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 {
|
bool hasContent() const { return !Die->getChildren().empty(); }
|
||||||
return !Die->getChildren().empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// AddGlobal - Add a new global entity to the compile unit.
|
/// AddGlobal - Add a new global entity to the compile unit.
|
||||||
///
|
///
|
||||||
void AddGlobal(const std::string &Name, DIE *Die) {
|
void AddGlobal(const std::string &Name, DIE *Die) { Globals[Name] = Die; }
|
||||||
Globals[Name] = Die;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// getDieMapSlotFor - Returns the debug information entry map slot for the
|
/// getDieMapSlotFor - Returns the debug information entry map slot for the
|
||||||
/// specified debug variable.
|
/// specified debug variable.
|
||||||
DIE *&getDieMapSlotFor(GlobalVariable *GV) {
|
DIE *&getDieMapSlotFor(GlobalVariable *GV) { return GVToDieMap[GV]; }
|
||||||
return GVToDieMap[GV];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// getDIEEntrySlotFor - Returns the debug information entry proxy slot for the
|
/// getDIEEntrySlotFor - Returns the debug information entry proxy slot for the
|
||||||
/// specified debug variable.
|
/// specified debug variable.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user