[llvm-commits] [dragonegg] r94910 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat Jan 30 09:57:30 PST 2010
Author: baldrick
Date: Sat Jan 30 11:57:30 2010
New Revision: 94910
URL: http://llvm.org/viewvc/llvm-project?rev=94910&view=rev
Log:
Port commit 94588 (dpatel) from llvm-gcc:
Fix vtable index.
Set containing type (a class that holds current class's vtable) entry.
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=94910&r1=94909&r2=94910&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat Jan 30 11:57:30 2010
@@ -276,6 +276,8 @@
unsigned VIndex = 0;
DIType ContainingType;
if (DECL_VINDEX (FnDecl)) {
+ if (host_integerp (DECL_VINDEX (FnDecl), 0))
+ VIndex = tree_low_cst (DECL_VINDEX (FnDecl), 0);
Virtuality = dwarf::DW_VIRTUALITY_virtual;
ContainingType = getOrCreateType(DECL_CONTEXT (FnDecl));
}
@@ -869,6 +871,8 @@
unsigned VIndex = 0;
DIType ContainingType;
if (DECL_VINDEX (Member)) {
+ if (host_integerp (DECL_VINDEX (Member), 0))
+ VIndex = tree_low_cst (DECL_VINDEX (Member), 0);
Virtuality = dwarf::DW_VIRTUALITY_virtual;
ContainingType = getOrCreateType(DECL_CONTEXT(Member));
}
@@ -892,6 +896,11 @@
if (RI != RegionMap.end())
RegionMap.erase(RI);
+ llvm::DIType ContainingType;
+ if (TYPE_VFIELD (type)) {
+ tree vtype = DECL_FCONTEXT (TYPE_VFIELD (type));
+ ContainingType = getOrCreateType(vtype);
+ }
llvm::DICompositeType RealDecl =
DebugFactory.CreateCompositeType(Tag, findRegion(TYPE_CONTEXT(type)),
GetNodeName(type),
@@ -899,7 +908,7 @@
Loc.line,
NodeSizeInBits(type), NodeAlignInBits(type),
0, SFlags, llvm::DIType(), Elements,
- RunTimeLang);
+ RunTimeLang, ContainingType.getNode());
RegionMap[type] = WeakVH(RealDecl.getNode());
// Now that we have a real decl for the struct, replace anything using the
More information about the llvm-commits
mailing list