mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
Bugfix for r181629:
- The return type should be a pointer to the class type. - Make the condition more specific. rdar://problem/13359718 llvm-svn: 182504
This commit is contained in:
parent
d082ea15f4
commit
ef6fca5536
@ -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.
|
||||
|
@ -16,7 +16,8 @@
|
||||
// CHECK: ![[FOO:[0-9]+]] = metadata {{.*}}; [ DW_TAG_structure_type ] [Foo]
|
||||
// CHECK: metadata !"+[Foo defaultFoo]", metadata !"", i32 [[@LINE-2]], metadata ![[TYPE:[0-9]+]]
|
||||
// CHECK: ![[TYPE]] = {{.*}} metadata ![[RESULT:[0-9]+]], i32 {{.*}}, i32 {{.*}}} ; [ DW_TAG_subroutine_type ]
|
||||
// CHECK: ![[RESULT]] = metadata !{metadata ![[FOO]],
|
||||
// CHECK: ![[RESULT]] = metadata {{.*}}{metadata ![[FOOPTR:[0-9]+]],
|
||||
// CHECK: ![[FOOPTR]] = {{.*}}, metadata ![[FOO]]}{{.*}}[ DW_TAG_pointer_type ] {{.*}} [from Foo]
|
||||
@end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user