[cfe-commits] r170154 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-class.cpp
David Blaikie
dblaikie at gmail.com
Thu Dec 13 15:00:23 PST 2012
On Thu, Dec 13, 2012 at 2:54 PM, Robinson, Paul
<Paul.Robinson at am.sony.com> wrote:
> Does dragonegg need to be updated as well?
I don't know, I've not been testing it.
- David
> --paulr
> ________________________________________
> From: cfe-commits-bounces at cs.uiuc.edu [cfe-commits-bounces at cs.uiuc.edu] on behalf of David Blaikie [dblaikie at gmail.com]
> Sent: Thursday, December 13, 2012 2:29 PM
> To: cfe-commits at cs.uiuc.edu
> Subject: [cfe-commits] r170154 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-class.cpp
>
> Author: dblaikie
> Date: Thu Dec 13 16:29:06 2012
> New Revision: 170154
>
> URL: http://llvm.org/viewvc/llvm-project?rev=170154&view=rev
> Log:
> Debug Info: Emit vtables pointer members as artificial.
>
> I wasn't sure where to put the test case for this, but this seemed like as good
> a place as any. I had to reorder the tests here to make them legible while
> still matching the order of metadata output in the IR file (for some reason
> making it virtual changed the ordering).
>
> Relevant commit to fix up LLVM to actually respect 'artificial' member
> variables is coming once I write up a test case for it.
>
> Modified:
> cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> cfe/trunk/test/CodeGenCXX/debug-info-class.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=170154&r1=170153&r2=170154&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Dec 13 16:29:06 2012
> @@ -1199,7 +1199,7 @@
> unsigned Size = CGM.getContext().getTypeSize(CGM.getContext().VoidPtrTy);
> llvm::DIType VPTR
> = DBuilder.createMemberType(Unit, getVTableName(RD), Unit,
> - 0, Size, 0, 0, 0,
> + 0, Size, 0, 0, llvm::DIDescriptor::FlagArtificial,
> getOrCreateVTablePtrType(Unit));
> EltTys.push_back(VPTR);
> }
>
> Modified: cfe/trunk/test/CodeGenCXX/debug-info-class.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-class.cpp?rev=170154&r1=170153&r2=170154&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/debug-info-class.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/debug-info-class.cpp Thu Dec 13 16:29:06 2012
> @@ -8,6 +8,11 @@
> union baz;
> void func(baz *f) { // CHECK: DW_TAG_union_type
> }
> +class B { // CHECK: DW_TAG_class_type
> +public:
> + virtual ~B();
> +// CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ]
> +};
> struct A { // CHECK: DW_TAG_structure_type
> int one;
> static const int HdrSize = 52; // CHECK: HdrSize
> @@ -16,8 +21,8 @@
> int x = 1;
> }
> };
> -class B { // CHECK: DW_TAG_class_type
> -};
> +
> +
> int main() {
> A a;
> B b;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list