blob: 9a737cf79655c6ffd29224ca7136565f6c417662 [file] [log] [blame]
Adrian Prantld072e592013-05-03 20:11:48 +00001// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
2
3// Check the line numbers for the ret instruction. We expect it to be
4// at the closing of the lexical scope in this case. See the comments in
5// CodeGenFunction::FinishFunction() for more details.
6
7// CHECK: define {{.*}}foo
8// CHECK: store {{.*}}, !dbg ![[CONV:[0-9]+]]
9// CHECK: ret {{.*}}, !dbg ![[RET:[0-9]+]]
10
11void foo(char c)
12{
13 int i;
Stephen Hines0e2c34f2015-03-23 12:09:02 -070014 // CHECK: ![[CONV]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
Adrian Prantld072e592013-05-03 20:11:48 +000015 i = c;
Stephen Hines0e2c34f2015-03-23 12:09:02 -070016 // CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
Adrian Prantld072e592013-05-03 20:11:48 +000017}