Files
clang-p2996/clang/test/CodeGenObjC/debug-info-ivars-extension.m
Douglas Katzman 3459ce2e5e Stop messing with the 'g' group of options in CompilerInvocation.
With this change, most 'g' options are rejected by CompilerInvocation.
They remain only as Driver options. The new way to request debug info
from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}"
and "-dwarf-version={2|3|4}". In the absence of a command-line option
to specify Dwarf version, the Toolchain decides it, rather than placing
Toolchain-specific logic in CompilerInvocation.

Also fix a bug in the Windows compatibility argument parsing
in which the "rightmost argument wins" principle failed.

Differential Revision: http://reviews.llvm.org/D13221

llvm-svn: 249655
2015-10-08 04:24:12 +00:00

48 lines
1.2 KiB
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
// Make sure we generate debug symbols for ivars added by a class extension.
@interface I
{
@public int a;
}
@end
void foo(I* pi) {
// poking into pi for primary class ivars.
int _a = pi->a;
}
@interface I()
{
@public int b;
}
@end
void gorf (I* pg) {
// poking into pg for ivars for class extension
int _b = pg->b;
}
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
// Check for "a".
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
// CHECK-SAME: line: 7
// CHECK-SAME: baseType: ![[INT:[0-9]+]]
// CHECK-SAME: size: 32, align: 32
// CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagPublic
// CHECK: ![[INT]] = !DIBasicType(name: "int"
// Make sure we don't output the same type twice.
// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
// Check for "b".
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"
// CHECK-SAME: line: 18
// CHECK-SAME: baseType: ![[INT]]
// CHECK-SAME: size: 32, align: 32
// CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagPublic