brintos

brintos / llvm-project-archived public Read only

0
0
Text · 563 B · 50d5885 Raw
17 lines · c
1// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -fextend-variable-liveness -o - %s | FileCheck %s2 3// Clang adjusts the line numbers of returns based on the line numbers of4// dominating stores to %retval; we test that fake use intrinsics do not affect5// this, and the return is given the correct line.6 7// CHECK: define{{.*}}@main8// CHECK: call void (...) @llvm.fake.use(i329// CHECK-NEXT: ret i32{{.*}}!dbg ![[MDINDEX:[0-9]*]]10// CHECK: ![[MDINDEX]] = !DILocation(line: [[# @LINE + 5]]11int main()12{13  volatile int a = 1;14  int b = a + 2;15  return b;16}17