This is an archive of the discontinued LLVM Phabricator instance.

Preserve extern_weak linkage in CloneModule.
ClosedPublic

Authored by eugenis on Mar 28 2016, 5:46 PM.

Details

Reviewers
pcc
Summary

Only force "extern" linkage if the function used to be a definition
in the source module. Declarations keep their original linkage.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis updated this revision to Diff 51865.Mar 28 2016, 5:46 PM
eugenis retitled this revision from to Preserve extern_weak linkage in CloneModule..
eugenis updated this object.
eugenis added a reviewer: pcc.
eugenis set the repository for this revision to rL LLVM.
eugenis added a subscriber: llvm-commits.
pcc added inline comments.Mar 30 2016, 6:25 PM
lib/Transforms/Utils/CloneModule.cpp
128–129

Shouldn't we also do this for global variables?

eugenis updated this revision to Diff 52269.Mar 31 2016, 1:03 PM
eugenis marked an inline comment as done.
pcc accepted this revision.Mar 31 2016, 1:11 PM
pcc edited edge metadata.

LGTM with a test for global variables

This revision is now accepted and ready to land.Mar 31 2016, 1:11 PM
eugenis updated this revision to Diff 52276.Mar 31 2016, 1:22 PM
eugenis edited edge metadata.
In D18536#388632, @pcc wrote:

LGTM with a test for global variables

done

eugenis closed this revision.Mar 31 2016, 1:26 PM

r265043