Comment and cleanup.

rdar://problem/13359718

llvm-svn: 182524
This commit is contained in:
Adrian Prantl 2013-05-22 21:37:49 +00:00
parent b153c2f749
commit 5f3601016c
1 changed files with 7 additions and 5 deletions

View File

@ -2256,11 +2256,13 @@ llvm::DIType CGDebugInfo::getOrCreateFunctionType(const Decl *D,
SmallVector<llvm::Value *, 16> Elts;
// First element is always return type. For 'void' functions it is NULL.
QualType ResultTy =
OMethod->getResultType() == CGM.getContext().getObjCInstanceType()
? CGM.getContext().getPointerType(
QualType(OMethod->getClassInterface()->getTypeForDecl(), 0))
: OMethod->getResultType();
QualType ResultTy = OMethod->getResultType();
// Replace the instancetype keyword with the actual type.
if (ResultTy == CGM.getContext().getObjCInstanceType())
ResultTy = CGM.getContext().getPointerType(
QualType(OMethod->getClassInterface()->getTypeForDecl(), 0));
Elts.push_back(getOrCreateType(ResultTy, F));
// "self" pointer is always first argument.
QualType SelfDeclTy = OMethod->getSelfDecl()->getType();