Skip to content

Provide unique name from closures with same name#488

Open
kvpanch wants to merge 1 commit intomainfrom
kvpanch/issue_474
Open

Provide unique name from closures with same name#488
kvpanch wants to merge 1 commit intomainfrom
kvpanch/issue_474

Conversation

@kvpanch
Copy link
Contributor

@kvpanch kvpanch commented Mar 4, 2026

In YUL it's possible to declare closure with a same name, but in different scope, which previously resulted to func name conflict during LLVM IR construction.
To solve this, track YUL scope when building LLVM IR and a special counter that increments every time function with the same name exists in LLVM module.
There's still assert if somehow within the same scope there 2 functions with the same name, which should be forbidden by Yul

Fixes: #474

In YUL it's possible to declare closure with a same name, but in
different scope, which previously resulted to func name conflict during LLVM
IR construction.
To solve this, track YUL scope when building LLVM IR and a special
counter that increments every time function with the same name exists in
LLVM module.
There's still assert if somehow within the same scope there 2 functions
with the same name, which should be forbidden by Yul

Fixes: #474
@kvpanch kvpanch requested review from elle-j and xermicus March 4, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE same-named Yul functions in sibling blocks

1 participant