[llvm-commits] [dragonegg] r94912 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat Jan 30 10:20:02 PST 2010
Author: baldrick
Date: Sat Jan 30 12:20:02 2010
New Revision: 94912
URL: http://llvm.org/viewvc/llvm-project?rev=94912&view=rev
Log:
Port commit 94871 (dpatel) from llvm-gcc:
Emit debug info for class static variables.
Modified:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=94912&r1=94911&r2=94912&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat Jan 30 12:20:02 2010
@@ -809,6 +809,9 @@
// Should we skip.
if (DECL_P(Member) && DECL_IGNORED_P(Member)) continue;
+ // Get the location of the member.
+ expanded_location MemLoc = GetNodeLocation(Member, false);
+
if (TREE_CODE(Member) == FIELD_DECL) {
if (!OffsetIsLLVMCompatible(Member))
@@ -822,9 +825,6 @@
|| TREE_CODE (TREE_TYPE (Member)) == RECORD_TYPE))
continue;
- // Get the location of the member.
- expanded_location MemLoc = GetNodeLocation(Member, false);
-
// Field type is the declared type of the field.
tree FieldNodeType = FieldType(Member);
DIType MemberType = getOrCreateType(FieldNodeType);
@@ -845,8 +845,14 @@
int_bit_position(Member),
MFlags, MemberType);
EltTys.push_back(DTy);
- } else {
- DEBUGASSERT(0 && "Unsupported member tree code!");
+ } if (TREE_CODE(Member) == VAR_DECL) {
+ EltTys.push_back(DebugFactory.
+ CreateVariable(DW_TAG_auto_variable,
+ findRegion(DECL_CONTEXT(Member)),
+ GetNodeName(Member),
+ getOrCreateCompileUnit(MemLoc.file),
+ MemLoc.line,
+ getOrCreateType(TREE_TYPE(Member))));
}
}
More information about the llvm-commits
mailing list