[cfe-commits] r83567 - /cfe/trunk/lib/CodeGen/CGDecl.cpp
Devang Patel
dpatel at apple.com
Thu Oct 8 11:53:38 PDT 2009
Author: dpatel
Date: Thu Oct 8 13:53:37 2009
New Revision: 83567
URL: http://llvm.org/viewvc/llvm-project?rev=83567&view=rev
Log:
Record location info before emiting alloca for arguments. This allows arguments to have proper location info.
Modified:
cfe/trunk/lib/CodeGen/CGDecl.cpp
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=83567&r1=83566&r2=83567&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Thu Oct 8 13:53:37 2009
@@ -550,6 +550,11 @@
"Invalid argument to EmitParmDecl");
QualType Ty = D.getType();
+ if (CGDebugInfo *DI = getDebugInfo()) {
+ DI->setLocation(D.getLocation());
+ DI->EmitStopPoint(CurFn, Builder);
+ }
+
llvm::Value *DeclPtr;
if (!Ty->isConstantSizeType()) {
// Variable sized values always are passed by-reference.
@@ -578,9 +583,7 @@
DMEntry = DeclPtr;
// Emit debug info for param declaration.
- if (CGDebugInfo *DI = getDebugInfo()) {
- DI->setLocation(D.getLocation());
+ if (CGDebugInfo *DI = getDebugInfo())
DI->EmitDeclareOfArgVariable(&D, DeclPtr, Builder);
- }
}
More information about the cfe-commits
mailing list