[cfe-commits] r125615 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Devang Patel dpatel at apple.com
Tue Feb 15 15:36:28 PST 2011


Author: dpatel
Date: Tue Feb 15 17:36:28 2011
New Revision: 125615

URL: http://llvm.org/viewvc/llvm-project?rev=125615&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=125615&r1=125614&r2=125615&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Feb 15 17:36:28 2011
@@ -1761,7 +1761,7 @@
   // 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





More information about the cfe-commits mailing list