Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GPUCompiler"
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
authors = ["Tim Besard <[email protected]>"]
version = "1.5.1"
authors = ["Tim Besard <[email protected]>"]

[deps]
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
Expand Down
14 changes: 9 additions & 5 deletions src/mangling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ safe_name(fn::String) = replace(fn, r"[^A-Za-z0-9]"=>"_")
safe_name(t::DataType) = safe_name(String(nameof(t)))
function safe_name(t::Type{<:Function})
# like Base.nameof, but for function types
mt = t.name.mt
fn = if mt === Symbol.name.mt
# uses shared method table, so name is not unique to this function type
nameof(t)
fn = if VERSION >= v"1.13.0-DEV.647"
t.name.singletonname
else
mt.name
mt = t.name.mt
if mt === Symbol.name.mt
# uses shared method table, so name is not unique to this function type
nameof(t)
else
mt.name
end
end
safe_name(string(fn))
end
Expand Down
Loading