diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-06-19 21:53:53 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-06-19 21:53:53 +0000 |
| commit | b9c667d808ae36ba08d463135feb8fd37ebe8050 (patch) | |
| tree | a584d2a0abb500d3fc4fcf0fc2f11b3c138c756a /clang/lib | |
| parent | b5101ab386b780e96c98bbc34e3a695ef4823b4c (diff) | |
| download | bcm5719-llvm-b9c667d808ae36ba08d463135feb8fd37ebe8050.tar.gz bcm5719-llvm-b9c667d808ae36ba08d463135feb8fd37ebe8050.zip | |
Debug Info: PR14763/r183329 - specify that non-trivial pass-by-value parameters are stored indirectly
This is to fix the location information for such parameters to refer to
the object accessible through the pointer rather than to the pointer
parameter itself.
llvm-svn: 184367
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 563faa4f780..8240c0846d5 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2622,6 +2622,9 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag, // otherwise it is 'self' or 'this'. if (isa<ImplicitParamDecl>(VD) && ArgNo == 1) Flags |= llvm::DIDescriptor::FlagObjectPointer; + if (llvm::Argument *Arg = dyn_cast<llvm::Argument>(Storage)) + if (Arg->getType()->isPointerTy() && !Arg->hasByValAttr() && !VD->getType()->isPointerType()) + Flags |= llvm::DIDescriptor::FlagIndirectVariable; llvm::MDNode *Scope = LexicalBlockStack.back(); |

