Skip to content

[Feature] [LLVM21] - Move IContext.* methods that use an IDIBuilder to Builder #390

@smaillet

Description

@smaillet

Is your feature request related to a problem? Please describe.
It's confusing and redundant to have to pass the builder as a parameter (effectively a "this") to a method on an otherwise unrelated type. A builder can get the context from the module it is attached to when needed.

Describe the solution you'd like
All methods accepting IDIBuilder on IContext (Or any other type/interface) where possible is moved to IDIBuilder for clarity and easier use.

Describe alternatives you've considered
Leaving it alone, but that leaves the confusion related to essentially passing "This" for the builder with a hidden reference to another type (the actual "this" used).

Additional context
This is a breaking change so should be left to a major LLVM release. The general idea is to move methods FOR an IDIBuilder to that interface. If it needs something else to complete the task it is provided as an explicit parameter.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions