mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Reuse DIEInteger for 1. This is frequently used while emitting an attribute using dwarf::DW_FORM_flag form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7db1e7a527
commit
ca76f6f57c
@ -322,6 +322,7 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
DwarfDebugRangeSectionSym = DwarfDebugLocSectionSym = 0;
|
||||
DwarfDebugLineSectionSym = CurrentLineSectionSym = 0;
|
||||
FunctionBeginSym = FunctionEndSym = 0;
|
||||
DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
|
||||
{
|
||||
NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
|
||||
beginModule(M);
|
||||
@ -376,7 +377,8 @@ DIEEntry *DwarfDebug::createDIEEntry(DIE *Entry) {
|
||||
void DwarfDebug::addUInt(DIE *Die, unsigned Attribute,
|
||||
unsigned Form, uint64_t Integer) {
|
||||
if (!Form) Form = DIEInteger::BestForm(false, Integer);
|
||||
DIEValue *Value = new (DIEValueAllocator) DIEInteger(Integer);
|
||||
DIEValue *Value = Integer == 1 ?
|
||||
DIEIntegerOne : new (DIEValueAllocator) DIEInteger(Integer);
|
||||
Die->addValue(Attribute, Form, Value);
|
||||
}
|
||||
|
||||
|
@ -263,6 +263,8 @@ class DwarfDebug {
|
||||
MCSymbol *DwarfDebugLocSectionSym;
|
||||
MCSymbol *DwarfDebugLineSectionSym, *CurrentLineSectionSym;
|
||||
MCSymbol *FunctionBeginSym, *FunctionEndSym;
|
||||
|
||||
DIEInteger *DIEIntegerOne;
|
||||
private:
|
||||
|
||||
/// getSourceDirectoryAndFileIds - Return the directory and file ids that
|
||||
|
Loading…
Reference in New Issue
Block a user