зеркало из https://github.com/microsoft/clang-1.git
Record location info before emiting alloca for arguments. This allows arguments to have proper location info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83567 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
27d4be5b3f
Коммит
e23429269f
|
@ -550,6 +550,11 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) {
|
|||
"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 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче