[llvm-commits] [llvm-gcc-4.2] r95241 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp

Devang Patel dpatel at apple.com
Wed Feb 3 11:58:14 PST 2010


Author: dpatel
Date: Wed Feb  3 13:58:13 2010
New Revision: 95241

URL: http://llvm.org/viewvc/llvm-project?rev=95241&view=rev
Log:
Do not skip artificial methods that are used. The debugger uses this information to reconstruct virtual base info.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=95241&r1=95240&r2=95241&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Wed Feb  3 13:58:13 2010
@@ -948,7 +948,8 @@
        Member = TREE_CHAIN(Member)) {
     
     if (DECL_ABSTRACT_ORIGIN (Member)) continue;
-    if (DECL_ARTIFICIAL (Member)) continue;
+    // Ignore unused aritificial members.
+    if (DECL_ARTIFICIAL (Member) && !TREE_USED (Member)) continue;
     // In C++, TEMPLATE_DECLs are marked Ignored, and should be.
     if (DECL_P (Member) && DECL_IGNORED_P (Member)) continue;
 
@@ -976,7 +977,8 @@
                                       LinkageName, 
                                       getOrCreateCompileUnit(MemLoc.file),
                                       MemLoc.line, SPTy, false, false,
-                                      Virtuality, VIndex, ContainingType);
+                                      Virtuality, VIndex, ContainingType,
+                                      DECL_ARTIFICIAL (Member));
       EltTys.push_back(SP);
       SPCache[Member] = WeakVH(SP.getNode());
     }





More information about the llvm-commits mailing list