This is an archive of the discontinued LLVM Phabricator instance.

Remove personality for declarations in CloneModule.
ClosedPublic

Authored by eugenis on Mar 25 2016, 4:56 PM.

Details

Reviewers
pcc
Summary

Personality is copied as part of copyFunctionAttributes, but it is
invalid on a declaration. Remove the personality attribute it the
function body is not cloned.

Also add a verifier run over output modules in the llvm-split tool.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis updated this revision to Diff 51702.Mar 25 2016, 4:56 PM
eugenis retitled this revision from to Update personality for declarations 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: Restricted Project.
pcc edited edge metadata.Mar 25 2016, 5:05 PM
pcc added a subscriber: llvm-commits.

Instead of doing this, we should probably fix the module splitter to not set the personality attribute on a function declaration.

What does the verifier make of this?

eugenis updated this revision to Diff 51841.Mar 28 2016, 2:15 PM
eugenis retitled this revision from Update personality for declarations in CloneModule. to Remove personality for declarations in CloneModule. .
eugenis updated this object.
eugenis edited edge metadata.
In D18486#383911, @pcc wrote:

Instead of doing this, we should probably fix the module splitter to not set the personality attribute on a function declaration.

Done.

What does the verifier make of this?

Verifier is not happy about this, but it is not being run. I've added a verifier pass to llvm-split, do you think it's a good idea?

pcc accepted this revision.Mar 28 2016, 2:30 PM
pcc edited edge metadata.

LGTM

I've added a verifier pass to llvm-split, do you think it's a good idea?

Yes, the modules we get from the splitter should verify.

This revision is now accepted and ready to land.Mar 28 2016, 2:30 PM
eugenis closed this revision.Mar 28 2016, 2:42 PM

r264667