-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IRGen][DebugInfo] split method declaration and definition.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// RUN: %target-swift-frontend -primary-file %s -emit-ir -gdwarf-types -o - | %FileCheck %s | ||
|
||
// Verify that we added a declaration for a method. | ||
public struct Foo { | ||
static func static_method() {} | ||
func method() {} | ||
} | ||
|
||
public class Bar { | ||
static func static_method() {} | ||
func method() {} | ||
} | ||
|
||
func a_function() {} | ||
|
||
// CHECK: distinct !DISubprogram(name: "static_method", | ||
// CHECK-SAME: declaration: | ||
// CHECK: distinct !DISubprogram(name: "method", | ||
// CHECK-SAME: declaration: | ||
// CHECK: distinct !DISubprogram(name: "static_method", | ||
// CHECK-SAME: declaration: | ||
// CHECK: distinct !DISubprogram(name: "method", | ||
// CHECK-SAME: declaration: | ||
|
||
// CHECK: distinct !DISubprogram(name: "a_function", | ||
// CHECK-NOT: declaration: | ||
// CHECK-SAME: ) |