debug-info-inheriting-constructor.cpp 947 B

12345678910111213141516171819202122232425
  1. // RUN: %clang_cc1 -debug-info-kind=standalone -std=c++11 -triple x86_64-darwin -emit-llvm -o - %s | FileCheck %s
  2. struct A {
  3. A(int, ...);
  4. };
  5. struct B : A {
  6. using A::A;
  7. };
  8. A::A(int i, ...) {}
  9. // CHECK: define void @{{.*}}foo
  10. // CHECK-NOT ret void
  11. // CHECK: call void @llvm.dbg.declare
  12. // CHECK-NOT ret void
  13. // CHECK: call void @llvm.dbg.declare(metadata %{{.*}}** %{{[^,]+}},
  14. // CHECK-SAME: metadata ![[THIS:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC:[0-9]+]]
  15. // CHECK: ret void, !dbg ![[NOINL:[0-9]+]]
  16. // CHECK: ![[FOO:.*]] = distinct !DISubprogram(name: "foo"
  17. // CHECK-DAG: ![[A:.*]] = distinct !DISubprogram(name: "A", linkageName: "_ZN1BCI11AEiz"
  18. void foo() {
  19. // CHECK-DAG: ![[LOC]] = !DILocation(line: 0, scope: ![[A]], inlinedAt: ![[INL:[0-9]+]])
  20. // CHECK-DAG: ![[INL]] = !DILocation(line: [[@LINE+1]], scope: ![[FOO]])
  21. B b(0);
  22. // CHECK: ![[NOINL]] = !DILocation(line: [[@LINE+1]], scope: !{{[0-9]+}}, isImplicitCode: true)
  23. }