2015-11-21 02:29:01 +08:00
|
|
|
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -disable-llvm-passes -emit-llvm < %s | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
|
2010-08-25 08:28:56 +08:00
|
|
|
// Two variables with same name in separate scope.
|
|
|
|
// Radar 8330217.
|
|
|
|
int main() {
|
|
|
|
int j = 0;
|
|
|
|
int k = 0;
|
2015-08-01 02:59:37 +08:00
|
|
|
// CHECK: !DILocalVariable(name: "i"
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK-NEXT: !DILexicalBlock(
|
2014-10-23 03:34:33 +08:00
|
|
|
|
|
|
|
// Make sure we don't have any more lexical blocks because we don't need them in
|
|
|
|
// -gmlt.
|
2015-04-30 00:40:08 +08:00
|
|
|
// GMLT-NOT: !DILexicalBlock
|
2010-08-25 08:28:56 +08:00
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
|
j++;
|
2015-08-01 02:59:37 +08:00
|
|
|
// CHECK: !DILocalVariable(name: "i"
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK-NEXT: !DILexicalBlock(
|
|
|
|
// GMLT-NOT: !DILexicalBlock
|
2010-08-25 08:28:56 +08:00
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
|
k++;
|
2013-08-30 16:53:09 +08:00
|
|
|
return 0;
|
2010-08-25 08:28:56 +08:00
|
|
|
}
|