1 // RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
2 // RUN: %clang_cc1 -gline-tables-only -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
3 // Two variables with same name in separate scope.
4 // Radar 8330217.
5 int main() {
6 	int j = 0;
7 	int k = 0;
8 // CHECK: !DILocalVariable(name: "i"
9 // CHECK-NEXT: !DILexicalBlock(
10 
11 // FIXME: Looks like we don't actually need both these lexical blocks (disc 2
12 // just refers to disc 1, nothing actually uses disc 2).
13 // GMLT-NOT: !DILexicalBlock
14 // GMLT: !DILexicalBlockFile({{.*}}, discriminator: 2)
15 // GMLT-NOT: !DILexicalBlock
16 // GMLT: !DILexicalBlockFile({{.*}}, discriminator: 1)
17 // Make sure we don't have any more lexical blocks because we don't need them in
18 // -gmlt.
19 // GMLT-NOT: !DILexicalBlock
20 	for (int i = 0; i < 10; i++)
21 		j++;
22 // CHECK: !DILocalVariable(name: "i"
23 // CHECK-NEXT: !DILexicalBlock(
24 // GMLT-NOT: !DILexicalBlock
25 	for (int i = 0; i < 10; i++)
26 		k++;
27 	return 0;
28 }
29