aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-02-09 17:57:50 +0000
committerDevang Patel <dpatel@apple.com>2010-02-09 17:57:50 +0000
commit337472dcb74e302717f16bc5a4ef3763228c49e4 (patch)
tree0fa01a8428178d2c6d3a50a6cbf3a1ebe4907a86 /lib/CodeGen/CGDebugInfo.cpp
parent555d04f615e3ee7b3fe408b3ff5e1cccac8594c0 (diff)
Mark implicit "this" argument as an artificial argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 752d5b1964..8b3e195fa5 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -546,7 +546,10 @@ CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
ASTContext &Context = CGM.getContext();
QualType ThisPtr =
Context.getPointerType(Context.getTagDeclType(Method->getParent()));
- Elts.push_back(getOrCreateType(ThisPtr, Unit));
+ llvm::DIType ThisPtrType =
+ DebugFactory.CreateArtificialType(getOrCreateType(ThisPtr, Unit));
+ TypeCache[ThisPtr.getAsOpaquePtr()] = ThisPtrType.getNode();
+ Elts.push_back(ThisPtrType);
// Copy rest of the arguments.
for (unsigned i = 1, e = Args.getNumElements(); i != e; ++i)