brintos

brintos / llvm-project-archived public Read only

0
0
Text · 868 B · 26d98d0 Raw
23 lines · c
1// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -disable-llvm-passes -emit-llvm < %s | FileCheck %s2// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s3// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-directives-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s4// Two variables with same name in separate scope.5int main(void) {6	int j = 0;7	int k = 0;8// CHECK: !DILocalVariable(name: "i"9// CHECK-NEXT: !DILexicalBlock(10 11// Make sure we don't have any more lexical blocks because we don't need them in12// -gmlt.13// GMLT-NOT: !DILexicalBlock14	for (int i = 0; i < 10; i++)15		j++;16// CHECK: !DILocalVariable(name: "i"17// CHECK-NEXT: !DILexicalBlock(18// GMLT-NOT: !DILexicalBlock19	for (int i = 0; i < 10; i++)20		k++;21	return 0;22}23