Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debug Info: Insert dbg.value intrinsics immediately after the instruc…
…tion they describe. This improves the live ranges of local variables during debugging. <rdar://problem/26627376>
- Loading branch information
1 parent
c198611
commit fa28b5e
Showing
3 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// RUN: %target-swift-frontend -g -emit-ir %s | %FileCheck %s | ||
for i in 0 ..< 3 { | ||
// CHECK: %[[ALLOCA:[0-9]+]] = alloca %GSqSi_ | ||
// CHECK: %[[CAST:[0-9]+]] = bitcast %GSqSi_* %[[ALLOCA]] to i{{32|64}}* | ||
// CHECK: %[[LD:[0-9]+]] = load i{{32|64}}, i{{32|64}}* %[[CAST]] | ||
// CHECK-NEXT: call void @llvm.dbg.value(metadata i{{32|64}} %[[LD]], | ||
// CHECK-SAME: metadata ![[I:[0-9]+]], | ||
// CHECK: ![[I]] = !DILocalVariable(name: "i", | ||
} |