Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
      2 // self and _cmd are marked as DW_AT_artificial. 
      3 // myarg is not marked as DW_AT_artificial.
      4 
      5 @interface MyClass {
      6 }
      7 - (id)init:(int) myarg;
      8 @end
      9 
     10 @implementation MyClass
     11 - (id) init:(int) myarg
     12 {
     13     return self;
     14 }
     15 @end
     16 
     17 // It's weird that the first two parameters are recorded as being in a
     18 // different, ("<unknown>") file compared to the third parameter which is 'in'
     19 // the actual source file. (see the metadata node after the arg name in each
     20 // line)
     21 // CHECK: metadata !{i32 {{.*}}, metadata ![[CTOR:.*]], metadata !"self", metadata ![[UNKFILE:.*]], i32 16777227, metadata !{{.*}}, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [self] [line 11]
     22 // CHECK: metadata !{i32 {{.*}}, metadata ![[CTOR]], metadata !"_cmd", metadata ![[UNKFILE]], i32 33554443, metadata !{{.*}}, i32 64, i32 0} ; [ DW_TAG_arg_variable ] [_cmd] [line 11]
     23 // CHECK: metadata !{i32 {{.*}}, metadata ![[CTOR]], metadata !"myarg", metadata !{{.*}}, i32 50331659, metadata !{{.*}}, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [myarg] [line 11]
     24