This is an archive of the discontinued LLVM Phabricator instance.

BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary.
ClosedPublic

Authored by pcc on Jun 23 2016, 5:57 PM.

Details

Summary

The function name Module::empty() is slightly misleading in that it
only tests for the presence of functions in the module. However we
still want to emit the module summary if the module contains only
global variables or aliases. The presence of such entities can be
determined simply by checking the summary directly, as we are doing
below.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 61748.Jun 23 2016, 5:57 PM
pcc retitled this revision from to BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary..
pcc updated this object.
pcc added reviewers: tejohnson, mehdi_amini.
pcc added a subscriber: llvm-commits.
mehdi_amini edited edge metadata.Jun 23 2016, 6:59 PM

LGTM

Thanks, that's indeed misleading. But probably coherent with Module::begin /end...

This revision was automatically updated to reflect the committed changes.