Skip to content

constants should be tagged with unnamed_addr to merge them #5613

Closed
@thestinger

Description

@thestinger

LLVM only exposes setUnnamedAddr through the C++ API, sadly.

Marking constants this way allows LLVM to merge the representations, because it informs the compiler that the uniqueness of the address is unimportant.

If you absolutely must have a unique address, it should probably be expressed with an attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions