]> granicus.if.org Git - clang/commitdiff
Mark implicit "this" argument as an artificial argument.
authorDevang Patel <dpatel@apple.com>
Tue, 9 Feb 2010 17:57:50 +0000 (17:57 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 9 Feb 2010 17:57:50 +0000 (17:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95673 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 752d5b1964cc8300497a95c441d1c9c898854d02..8b3e195fa523a036e0d7906176ae3c0bc3d2253b 100644 (file)
@@ -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)