diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenObjC/debug-info-direct-method.m | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/debug-info-direct-method.m b/clang/test/CodeGenObjC/debug-info-direct-method.m new file mode 100644 index 00000000000..f822088f946 --- /dev/null +++ b/clang/test/CodeGenObjC/debug-info-direct-method.m @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -debug-info-kind=limited -w -triple x86_64-apple-darwin10 %s -o - | FileCheck %s +// RUN: %clang_cc1 -dwarf-version=4 -emit-llvm -debug-info-kind=limited -w -triple x86_64-apple-darwin10 %s -o - | FileCheck %s + +__attribute__((objc_root_class)) +@interface Root +@end + +@implementation Root +- (int)getInt __attribute__((objc_direct)) { + return 42; +} +@end + +// Test that objc_direct methods are always (even in DWARF < 5) emitted +// as members of their containing class. + +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Root", +// CHECK-SAME: elements: ![[MEMBERS:[0-9]+]], +// CHECK-SAME: runtimeLang: DW_LANG_ObjC) +// CHECK: ![[MEMBERS]] = !{![[GETTER:[0-9]+]]} +// CHECK: ![[GETTER]] = !DISubprogram(name: "-[Root getInt]", |