blob: 2d329f5186e58a20bbce688a9f294e02edfcedb4 [file] [log] [blame]
David Blaikie66e41972015-01-14 07:38:27 +00001// RUN: %clang_cc1 -triple %itanium_abi_triple -g -mllvm -no-discriminators -emit-llvm %s -o - | FileCheck %s
David Blaikie21cd7cf2014-06-25 17:57:34 +00002
3struct C {
4 ~C();
5};
6extern bool b;
David Blaikie1b5adb82014-07-10 20:42:59 +00007// CHECK: call {{.*}}, !dbg [[DTOR_CALL1_LOC:![0-9]*]]
8// CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
Duncan P. N. Exon Smith8cd9d7a2015-08-26 22:50:48 +00009// CHECK: [[FUN1:.*]] = distinct !DISubprogram(name: "fun1",{{.*}} isDefinition: true
10// CHECK: [[FUN2:.*]] = distinct !DISubprogram(name: "fun2",{{.*}} isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000011// CHECK: [[DTOR_CALL1_LOC]] = !DILocation(line: [[@LINE+1]], scope: [[FUN1]])
David Blaikie1b5adb82014-07-10 20:42:59 +000012void fun1() { b && (C(), 1); }
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000013// CHECK: [[DTOR_CALL2_LOC]] = !DILocation(line: [[@LINE+1]], scope: [[FUN2]])
David Blaikie1b5adb82014-07-10 20:42:59 +000014bool fun2() { return (C(), b) && 0; }