xref: /llvm-project/clang/test/CodeGen/debug-info-programming-language.c (revision b1d7010caa4394e7f5b41c627702f6acabe0cec5)
1c73876dbSDavid Blaikie // RUN: %clang_cc1 -dwarf-version=3 -emit-llvm -triple %itanium_abi_triple %s -o - \
2c73876dbSDavid Blaikie // RUN:   -x c -std=c11 -O0 -disable-llvm-passes -debug-info-kind=limited \
3c73876dbSDavid Blaikie // RUN:   | FileCheck --check-prefix=CHECK-C11 %s
4c73876dbSDavid Blaikie // RUN: %clang_cc1 -dwarf-version=3 -emit-llvm -triple %itanium_abi_triple %s -o - \
5c73876dbSDavid Blaikie // RUN:   -x c -std=c17 -O0 -disable-llvm-passes -debug-info-kind=limited \
6c73876dbSDavid Blaikie // RUN:   | FileCheck --check-prefix=CHECK-C17 %s
7*b1d7010cSChen Zheng // RUN: %clang_cc1 -dwarf-version=3 -emit-llvm -triple %itanium_abi_triple %s -o - \
8*b1d7010cSChen Zheng // RUN:   -x c -std=c11 -O0 -disable-llvm-passes -debug-info-kind=limited \
9*b1d7010cSChen Zheng // RUN:   -gstrict-dwarf | FileCheck --check-prefix=CHECK-STRICT %s
10*b1d7010cSChen Zheng // RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -triple %itanium_abi_triple %s -o - \
11*b1d7010cSChen Zheng // RUN:   -x c -std=c11 -O0 -disable-llvm-passes -debug-info-kind=limited \
12*b1d7010cSChen Zheng // RUN:   -gstrict-dwarf | FileCheck --check-prefix=CHECK-C11 %s
13c73876dbSDavid Blaikie 
14*b1d7010cSChen Zheng // CHECK-STRICT: !DICompileUnit(language: DW_LANG_C99
15c73876dbSDavid Blaikie // CHECK-C11: !DICompileUnit(language: DW_LANG_C11
16c73876dbSDavid Blaikie // Update this check once support for DW_LANG_C17 is broadly supported/known in
17c73876dbSDavid Blaikie // consumers. Maybe we'll skip this and go to the DWARFv6 language+version
18c73876dbSDavid Blaikie // encoding that avoids the risk of regression when describing a language
19c73876dbSDavid Blaikie // version newer than what the consumer is aware of.
20c73876dbSDavid Blaikie // CHECK-C17: !DICompileUnit(language: DW_LANG_C11
21c73876dbSDavid Blaikie 
f1(void)22c73876dbSDavid Blaikie void f1(void) { }
23