forked from OSchip/llvm-project
Make sure that forward declarations are marked as such in the debug info
for the structure type. rdar://10499337 llvm-svn: 145461
This commit is contained in:
parent
82e1bd8e94
commit
607fb70750
|
@ -1214,7 +1214,8 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
|
|||
if (ID->isForwardDecl()) {
|
||||
llvm::DIType FwdDecl =
|
||||
DBuilder.createStructType(Unit, ID->getName(),
|
||||
DefUnit, Line, 0, 0, 0,
|
||||
DefUnit, Line, 0, 0,
|
||||
llvm::DIDescriptor::FlagFwdDecl,
|
||||
llvm::DIArray(), RuntimeLang);
|
||||
return FwdDecl;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// RUN: %clang -fverbose-asm -g -S -emit-llvm %s -o - | FileCheck %s
|
||||
@class ForwardObjcClass;
|
||||
ForwardObjcClass *ptr = 0;
|
||||
|
||||
// CHECK: !8 = metadata !{i32 720915, metadata !6, metadata !"ForwardObjcClass", metadata !6, i32 2, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 16, i32 0} ; [ DW_TAG_structure_type ]
|
Loading…
Reference in New Issue