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
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 091dcc9..2debea1 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -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