1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
2f4a2713aSLionel Sambuc
3f4a2713aSLionel Sambuc // Check the line numbers for the ret instruction. We expect it to be
4f4a2713aSLionel Sambuc // at the closing of the lexical scope in this case. See the comments in
5f4a2713aSLionel Sambuc // CodeGenFunction::FinishFunction() for more details.
6f4a2713aSLionel Sambuc
7f4a2713aSLionel Sambuc // CHECK: define {{.*}}foo
8f4a2713aSLionel Sambuc // CHECK: store {{.*}}, !dbg ![[CONV:[0-9]+]]
9f4a2713aSLionel Sambuc // CHECK: ret {{.*}}, !dbg ![[RET:[0-9]+]]
10f4a2713aSLionel Sambuc
foo(char c)11f4a2713aSLionel Sambuc void foo(char c)
12f4a2713aSLionel Sambuc {
13f4a2713aSLionel Sambuc int i;
14*0a6a1f1dSLionel Sambuc // CHECK: ![[CONV]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
15f4a2713aSLionel Sambuc i = c;
16*0a6a1f1dSLionel Sambuc // CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
17f4a2713aSLionel Sambuc }
18