mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
Construct enumerator DIE using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -126,7 +126,7 @@ namespace llvm {
|
|||||||
explicit DIEnumerator(GlobalVariable *GV = 0);
|
explicit DIEnumerator(GlobalVariable *GV = 0);
|
||||||
|
|
||||||
std::string getName() const { return getStringField(1); }
|
std::string getName() const { return getStringField(1); }
|
||||||
uint64_t getLanguage() const { return getUInt64Field(2); }
|
uint64_t getEnumValue() const { return getUInt64Field(2); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DIType - This is a wrapper for a type.
|
/// DIType - This is a wrapper for a type.
|
||||||
|
@ -1579,6 +1579,17 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// ConstructEnumTypeDIE - Construct enum type DIE from
|
||||||
|
/// DIEnumerator.
|
||||||
|
void ConstructEnumType(CompileUnit *DW_Unit,
|
||||||
|
DIE &Buffer, DIEnumerator *ETy) {
|
||||||
|
|
||||||
|
DIE *Enumerator = new DIE(DW_TAG_enumerator);
|
||||||
|
AddString(Enumerator, DW_AT_name, DW_FORM_string, ETy->getName());
|
||||||
|
int64_t Value = ETy->getEnumValue();
|
||||||
|
AddSInt(Enumerator, DW_AT_const_value, DW_FORM_sdata, Value);
|
||||||
|
Buffer.AddChild(Enumerator);
|
||||||
|
}
|
||||||
|
|
||||||
/// ConstructType - Adds all the required attributes to the type.
|
/// ConstructType - Adds all the required attributes to the type.
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user