Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -disable-llvm-passes -emit-llvm < %s | FileCheck %s
      2 // RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -disable-llvm-passes -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 // Make sure we don't have any more lexical blocks because we don't need them in
     12 // -gmlt.
     13 // GMLT-NOT: !DILexicalBlock
     14 	for (int i = 0; i < 10; i++)
     15 		j++;
     16 // CHECK: !DILocalVariable(name: "i"
     17 // CHECK-NEXT: !DILexicalBlock(
     18 // GMLT-NOT: !DILexicalBlock
     19 	for (int i = 0; i < 10; i++)
     20 		k++;
     21 	return 0;
     22 }
     23