1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Construct enumerator DIE using DebugInfo.

llvm-svn: 61726
This commit is contained in:
Devang Patel 2009-01-05 18:38:38 +00:00
parent f543d03f11
commit de65ed6370
2 changed files with 12 additions and 1 deletions

View File

@ -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.

View File

@ -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.
///