Skip to content

linker should handle parameter attributes better #2577

@llvmbot

Description

@llvmbot
Bugzilla Link 2205
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @asl

Extended Description

Case 1: two declarations. Consider module a:

declare void @​f() nounwind

and module b:

declare void @​f()

If you do
llvm-link a.bc b.bc
then @​f is nounwind, while with
llvm-link b.bc a.bc
it is not nounwind. It would be safer to
have it not nounwind in both cases. More
generally, attributes should probably be
"and"'d together when the linker joins two
declarations.

Case 2: declaration and definition. Consider module a:

declare void @​f() nounwind

and module b:

define void @​f() {
ret void
}

Once again whether @​f is nounwind in the linked
module depends on the order. What should happen
is that the attributes from the definition should
win.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions