Static methods do not need "this" pointer argument.

llvm-svn: 94756
This commit is contained in:
Devang Patel 2010-01-28 21:43:50 +00:00
parent 946edc1aa6
commit 4c3e7e99ca
1 changed files with 5 additions and 0 deletions

View 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();