diff options
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 5 |
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) |