[cfe-commits] r125249 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Wed Feb 9 16:40:52 PST 2011
Author: dpatel
Date: Wed Feb 9 18:40:52 2011
New Revision: 125249
URL: http://llvm.org/viewvc/llvm-project?rev=125249&view=rev
Log:
If an aggregate is returned as 'sret' argument then let debugger know about this.
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=125249&r1=125248&r2=125249&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Feb 9 18:40:52 2011
@@ -1764,6 +1764,12 @@
if (IndirectArgument && VD->getType()->isRecordType())
Ty = DBuilder.CreateReferenceType(Ty);
+ // If Storage is an aggregate returned as 'sret' then let debugger know
+ // about this.
+ if (llvm::Argument *Arg = dyn_cast<llvm::Argument>(Storage))
+ if (Arg->hasStructRetAttr())
+ Ty = DBuilder.CreateReferenceType(Ty);
+
// Get location information.
unsigned Line = getLineNumber(VD->getLocation());
unsigned Column = getColumnNumber(VD->getLocation());
More information about the cfe-commits
mailing list