[llvm-commits] [llvm] r61726 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Devang Patel
dpatel at apple.com
Mon Jan 5 10:38:38 PST 2009
Author: dpatel
Date: Mon Jan 5 12:38:38 2009
New Revision: 61726
URL: http://llvm.org/viewvc/llvm-project?rev=61726&view=rev
Log:
Construct enumerator DIE using DebugInfo.
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=61726&r1=61725&r2=61726&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Mon Jan 5 12:38:38 2009
@@ -126,7 +126,7 @@
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.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=61726&r1=61725&r2=61726&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Jan 5 12:38:38 2009
@@ -1579,6 +1579,17 @@
}
}
+ /// 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.
///
More information about the llvm-commits
mailing list