clang/test/DebugInfo/Generic/2010-02-15-DbgStaticVar.c
raw| 1 | // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s |
| 2 | // Test to check intentionally empty linkage name for a static variable. |
| 3 | static int foo(int a) |
| 4 | { |
| 5 | static int b = 1; |
| 6 | return b+a; |
| 7 | } |
| 8 | |
| 9 | int main(void) { |
| 10 | int j = foo(1); |
| 11 | return 0; |
| 12 | } |
| 13 | // CHECK: !DIGlobalVariable(name: "b", |
| 14 | // CHECK-NOT: linkageName: |
| 15 | // CHECK-SAME: ){{$}} |