summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-scope.c
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-10-22 19:34:33 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-10-22 19:34:33 +0000
commit60a877b5b9c27fb2c3418274d05d7b0063838948 (patch)
tree2ac4181347f52ce6447b3e5733d45b6da2acbe36 /clang/test/CodeGen/debug-info-scope.c
parent6d87ce8bd59a2b2e96fa418c4f5605cb8deda809 (diff)
downloadbcm5719-llvm-60a877b5b9c27fb2c3418274d05d7b0063838948.tar.gz
bcm5719-llvm-60a877b5b9c27fb2c3418274d05d7b0063838948.zip
DebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)
I haven't done any actual impact analysis of this change as it's a strict improvement, but I'd be curious to know how much it helps. llvm-svn: 220408
Diffstat (limited to 'clang/test/CodeGen/debug-info-scope.c')
-rw-r--r--clang/test/CodeGen/debug-info-scope.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-scope.c b/clang/test/CodeGen/debug-info-scope.c
index 9decaeafd50..d84fafd018d 100644
--- a/clang/test/CodeGen/debug-info-scope.c
+++ b/clang/test/CodeGen/debug-info-scope.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -gline-tables-only -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
// Two variables with same name in separate scope.
// Radar 8330217.
int main() {
@@ -6,10 +7,21 @@ int main() {
int k = 0;
// CHECK: DW_TAG_auto_variable ] [i]
// CHECK-NEXT: DW_TAG_lexical_block
+
+// FIXME: Looks like we don't actually need both these lexical blocks (disc 2
+// just refers to disc 1, nothing actually uses disc 2).
+// GMLT-NOT: DW_TAG_lexical_block
+// GMLT: "0xb\002", {{.*}}} ; [ DW_TAG_lexical_block ]
+// GMLT-NOT: DW_TAG_lexical_block
+// GMLT: "0xb\001", {{.*}}} ; [ DW_TAG_lexical_block ]
+// Make sure we don't have any more lexical blocks because we don't need them in
+// -gmlt.
+// GMLT-NOT: DW_TAG_lexical_block
for (int i = 0; i < 10; i++)
j++;
// CHECK: DW_TAG_auto_variable ] [i]
// CHECK-NEXT: DW_TAG_lexical_block
+// GMLT-NOT: DW_TAG_lexical_block
for (int i = 0; i < 10; i++)
k++;
return 0;
OpenPOWER on IntegriCloud