Skip to content

Commit 046ceba

Browse files
authored
Merge pull request #697 from JuliaGPU/tb/single_mt
Adapt to JuliaLang/julia#58131.
1 parent c3ba85b commit 046ceba

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GPUCompiler"
22
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
3-
authors = ["Tim Besard <[email protected]>"]
43
version = "1.5.1"
4+
authors = ["Tim Besard <[email protected]>"]
55

66
[deps]
77
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"

src/mangling.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ safe_name(fn::String) = replace(fn, r"[^A-Za-z0-9]"=>"_")
1010
safe_name(t::DataType) = safe_name(String(nameof(t)))
1111
function safe_name(t::Type{<:Function})
1212
# like Base.nameof, but for function types
13-
mt = t.name.mt
14-
fn = if mt === Symbol.name.mt
15-
# uses shared method table, so name is not unique to this function type
16-
nameof(t)
13+
fn = if VERSION >= v"1.13.0-DEV.647"
14+
t.name.singletonname
1715
else
18-
mt.name
16+
mt = t.name.mt
17+
if mt === Symbol.name.mt
18+
# uses shared method table, so name is not unique to this function type
19+
nameof(t)
20+
else
21+
mt.name
22+
end
1923
end
2024
safe_name(string(fn))
2125
end

0 commit comments

Comments
 (0)