Skip to content

Commit

Permalink
Add -disable-llvm-passes for frontend debug info tests.
Browse files Browse the repository at this point in the history
Summary: The frontend debuginfo tests should not invoke llvm passes which includes add-discriminators that will change the debug info generated by FE.

Reviewers: dblaikie

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D14848

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253686 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
danielcdh committed Nov 20, 2015
1 parent da953be commit cdf86ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 2 additions & 5 deletions test/CodeGen/debug-info-scope.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -emit-llvm < %s | FileCheck %s
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
// 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
// Two variables with same name in separate scope.
// Radar 8330217.
int main() {
Expand All @@ -8,9 +8,6 @@ int main() {
// CHECK: !DILocalVariable(name: "i"
// CHECK-NEXT: !DILexicalBlock(

// GMLT-NOT: !DILexicalBlock
// GMLT: !DILexicalBlockFile({{.*}}, discriminator: 1)
// GMLT: !DILexicalBlockFile({{.*}}, discriminator: 2)
// Make sure we don't have any more lexical blocks because we don't need them in
// -gmlt.
// GMLT-NOT: !DILexicalBlock
Expand Down
10 changes: 4 additions & 6 deletions test/CodeGenObjC/arc-linetable.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -debug-info-kind=standalone -dwarf-version=4 -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -debug-info-kind=standalone -dwarf-version=4 -disable-llvm-passes -triple x86_64-apple-darwin10 %s -o - | FileCheck %s

// Legend: EXP = Return expression, RET = ret instruction

Expand Down Expand Up @@ -34,9 +34,9 @@

// CHECK: define {{.*}}testCleanupVoid
// CHECK: icmp ne {{.*}}!dbg ![[SKIP1:[0-9]+]]
// CHECK: store i32 0, i32* {{.*}}, !dbg ![[STORE8:[0-9]+]]
// CHECK: @objc_storeStrong{{.*}}, !dbg ![[ARC8:[0-9]+]]
// CHECK: ret {{.*}} !dbg ![[RET8:[0-9]+]]
// CHECK: store i32 0, i32* {{.*}}, !dbg ![[RET8:[0-9]+]]
// CHECK: @objc_storeStrong{{.*}}, !dbg ![[RET8]]
// CHECK: ret {{.*}} !dbg ![[RET8]]

typedef signed char BOOL;

Expand Down Expand Up @@ -112,8 +112,6 @@ - (void)testCleanupVoid:(BOOL)skip withDelegate: (AppDelegate *) delegate {
[delegate testVoid :s];
}
}
// CHECK: ![[STORE8]] = !DILocation(line: [[@LINE+3]], scope:
// CHECK: ![[ARC8]] = !DILocation(line: [[@LINE+2]], scope:
// CHECK: ![[RET8]] = !DILocation(line: [[@LINE+1]], scope:
}

Expand Down

0 comments on commit cdf86ba

Please sign in to comment.