diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-05-22 21:37:49 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-05-22 21:37:49 +0000 |
| commit | 5f3601016c6ec91074cfc9a55794ec02e53f35d4 (patch) | |
| tree | 6fd059b1d2c97eb7f2d859efb8142e0d35dd73a8 /clang | |
| parent | b153c2f7491b44ccb0fa547e11aebfe518a077b8 (diff) | |
| download | bcm5719-llvm-5f3601016c6ec91074cfc9a55794ec02e53f35d4.tar.gz bcm5719-llvm-5f3601016c6ec91074cfc9a55794ec02e53f35d4.zip | |
Comment and cleanup.
rdar://problem/13359718
llvm-svn: 182524
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 8ef3749b2ad..ee0b8c984f9 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -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(); |

