merge DIEObjectLabel and DIEDwarfLabel into DIELabel.

Yes, DIE you fiendish labels, die all of you.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97995 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-08 22:31:46 +00:00
parent 7aa8189706
commit 4faf59af82
5 changed files with 13 additions and 89 deletions

View File

@@ -367,17 +367,7 @@ void DwarfDebug::addString(DIE *Die, unsigned Attribute, unsigned Form,
///
void DwarfDebug::addLabel(DIE *Die, unsigned Attribute, unsigned Form,
const MCSymbol *Label) {
// FIXME: Merge into DIEObjectLabel?
DIEValue *Value = new DIEDwarfLabel(Label);
DIEValues.push_back(Value);
Die->addValue(Attribute, Form, Value);
}
/// addObjectLabel - Add an non-Dwarf label attribute data and value.
///
void DwarfDebug::addObjectLabel(DIE *Die, unsigned Attribute, unsigned Form,
const MCSymbol *Sym) {
DIEValue *Value = new DIEObjectLabel(Sym);
DIEValue *Value = new DIELabel(Label);
DIEValues.push_back(Value);
Die->addValue(Attribute, Form, Value);
}
@@ -1704,16 +1694,16 @@ void DwarfDebug::constructGlobalVariableDIE(MDNode *N) {
dwarf::DW_FORM_ref4, VariableDie);
DIEBlock *Block = new DIEBlock();
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_addr);
addObjectLabel(Block, 0, dwarf::DW_FORM_udata,
Asm->GetGlobalValueSymbol(DI_GV.getGlobal()));
addLabel(Block, 0, dwarf::DW_FORM_udata,
Asm->GetGlobalValueSymbol(DI_GV.getGlobal()));
addBlock(VariableSpecDIE, dwarf::DW_AT_location, 0, Block);
addUInt(VariableDie, dwarf::DW_AT_declaration, dwarf::DW_FORM_flag, 1);
ModuleCU->addDie(VariableSpecDIE);
} else {
DIEBlock *Block = new DIEBlock();
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_addr);
addObjectLabel(Block, 0, dwarf::DW_FORM_udata,
Asm->GetGlobalValueSymbol(DI_GV.getGlobal()));
addLabel(Block, 0, dwarf::DW_FORM_udata,
Asm->GetGlobalValueSymbol(DI_GV.getGlobal()));
addBlock(VariableDie, dwarf::DW_AT_location, 0, Block);
}
addToContextOwner(VariableDie, GVContext);