summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index d1da81d2599..8ef3749b2ad 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2256,8 +2256,10 @@ 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->hasRelatedResultType()
- ? QualType(OMethod->getClassInterface()->getTypeForDecl(), 0)
+ QualType ResultTy =
+ OMethod->getResultType() == CGM.getContext().getObjCInstanceType()
+ ? CGM.getContext().getPointerType(
+ QualType(OMethod->getClassInterface()->getTypeForDecl(), 0))
: OMethod->getResultType();
Elts.push_back(getOrCreateType(ResultTy, F));
// "self" pointer is always first argument.
OpenPOWER on IntegriCloud