Adrian Prantl | 52bf3c4 | 2013-05-03 20:11:48 +0000 | [diff] [blame] | 1 | // 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 | |
| 11 | void foo(char c) |
| 12 | { |
| 13 | int i; |
Tobias Grosser | b3af390 | 2014-07-29 06:53:14 +0000 | [diff] [blame] | 14 | // CHECK: ![[CONV]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null} |
Adrian Prantl | 52bf3c4 | 2013-05-03 20:11:48 +0000 | [diff] [blame] | 15 | i = c; |
| 16 | // CHECK: ![[RET]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null} |
| 17 | } |