mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 19:32:16 +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:
parent
dfd19ddcfa
commit
c69bf2c832
@ -126,7 +126,7 @@ namespace llvm {
|
||||
explicit DIEnumerator(GlobalVariable *GV = 0);
|
||||
|
||||
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.
|
||||
|
@ -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.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user