From 6354d68cbbbda2ede44f68bb2cfe0f31795e8844 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 15 Feb 2011 23:36:28 +0000 Subject: [PATCH] Only c++ class arguments with non trivial constructor or destructor needs a reference. C struct arguments do not need this adjustment. This fixes 7 failures in callfuncs.exp from gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125615 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 091dcc9d0e..2debea1733 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1761,7 +1761,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag, // If an aggregate variable has non trivial destructor or non trivial copy // constructor than it is pass indirectly. Let debug info know about this // by using reference of the aggregate type as a argument type. - if (IndirectArgument && VD->getType()->isRecordType()) + if (IndirectArgument && VD->getType()->isClassType()) Ty = DBuilder.CreateReferenceType(Ty); // If Storage is an aggregate returned as 'sret' then let debugger know -- 2.50.1