-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing debug locations to constant / class variable read calls (#…
…11417) Fixes #11416. Although the constant read functions have a debug location, for some reason the calls themselves to the read functions do not. This PR adds them.
- Loading branch information
1 parent
c2429e2
commit e5bf6b9
Showing
9 changed files
with
101 additions
and
2 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,19 @@ | ||
require "prelude" | ||
|
||
class Foo | ||
def foo | ||
@@x | ||
# CHECK: call %String** @"~Bar::x:read" | ||
# CHECK-SAME: !dbg [[LOC:![0-9]+]] | ||
# CHECK: [[LOC]] = !DILocation | ||
# CHECK-SAME: line: [[# @LINE - 4]] | ||
# CHECK-SAME: column: 5 | ||
end | ||
|
||
@@x = "" | ||
end | ||
|
||
class Bar < Foo | ||
end | ||
|
||
Bar.new.foo |
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,19 @@ | ||
require "prelude" | ||
|
||
class Foo | ||
def foo | ||
end | ||
end | ||
|
||
def a_foo | ||
Foo.new | ||
end | ||
|
||
THE_FOO.foo | ||
# CHECK: call %Foo** @"~THE_FOO:read"() | ||
# CHECK-SAME: !dbg [[LOC:![0-9]+]] | ||
# CHECK: [[LOC]] = !DILocation | ||
# CHECK-SAME: line: 12 | ||
# CHECK-SAME: column: 1 | ||
|
||
THE_FOO = a_foo |
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,17 @@ | ||
class Foo | ||
def foo | ||
@@x | ||
# CHECK: call i32* @"~Foo+::x:read" | ||
# CHECK-SAME: !dbg [[LOC:![0-9]+]] | ||
# CHECK: [[LOC]] = !DILocation | ||
# CHECK-SAME: line: [[# @LINE - 4]] | ||
# CHECK-SAME: column: 5 | ||
end | ||
|
||
@@x = 1 | ||
end | ||
|
||
class Bar < Foo | ||
end | ||
|
||
(Foo.new || Bar.new).foo |
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,17 @@ | ||
class Foo | ||
def self.foo | ||
@@x | ||
# CHECK: call i32* @"~Foo+.class::x:read" | ||
# CHECK-SAME: !dbg [[LOC3:![0-9]+]] | ||
# CHECK: [[LOC3]] = !DILocation | ||
# CHECK-SAME: line: [[# @LINE - 4]] | ||
# CHECK-SAME: column: 5 | ||
end | ||
|
||
@@x = 1 | ||
end | ||
|
||
class Bar < Foo | ||
end | ||
|
||
(Foo || Bar).foo |
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