1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck --check-prefix LINUX %s
2 // RUN: %clang_cc1 -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -S -emit-llvm -o - %s | FileCheck --check-prefix MSVC %s
4 int main(int argc
, char* argv
[], char* arge
[]) {
6 // In both DWARF and CodeView, an unnamed C structure type will generate a
7 // DICompositeType without a name or identifier attribute;
9 struct { int bar
; } one
= {42};
11 // LINUX: !{{[0-9]+}} = !DILocalVariable(name: "one"
12 // LINUX-SAME: type: [[TYPE_OF_ONE:![0-9]+]]
14 // LINUX: [[TYPE_OF_ONE]] = distinct !DICompositeType(
15 // LINUX-SAME: tag: DW_TAG_structure_type
17 // LINUX-NOT: identifier:
20 // MSVC: !{{[0-9]+}} = !DILocalVariable(name: "one"
21 // MSVC-SAME: type: [[TYPE_OF_ONE:![0-9]+]]
23 // MSVC: [[TYPE_OF_ONE]] = distinct !DICompositeType
24 // MSVC-SAME: tag: DW_TAG_structure_type
26 // MSVC-NOT: identifier: