]> granicus.if.org Git - clang/commitdiff
Static methods do not need "this" pointer argument.
authorDevang Patel <dpatel@apple.com>
Thu, 28 Jan 2010 21:43:50 +0000 (21:43 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 28 Jan 2010 21:43:50 +0000 (21:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94756 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 4a4b1a91798fdb48546aa2f076e73c8835c6a2a2..9fdff82539f3b98d698c056de60361c87c35aa1a 100644 (file)
@@ -525,6 +525,11 @@ llvm::DIType
 CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
                                    llvm::DICompileUnit Unit) {
   llvm::DIType FnTy = getOrCreateType(Method->getType(), Unit);
+  
+  // Static methods do not need "this" pointer argument.
+  if (Method->isStatic())
+    return FnTy;
+
   // Add "this" pointer.
 
   llvm::DIArray Args = llvm::DICompositeType(FnTy.getNode()).getTypeArray();