OSDN Git Service

BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module...
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 24 Jun 2016 01:58:02 +0000 (01:58 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 24 Jun 2016 01:58:02 +0000 (01:58 +0000)
commit1d084dfa7bd3ea4eba73426661c24437d6487ad2
treeb268f61c14dfb16c2578316f449223b2f410b591
parentff42ad5784bdb654d5060e47e445f6687330c8eb
BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module 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.

Differential Revision: http://reviews.llvm.org/D21669

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273638 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp
test/Bitcode/thinlto-summary-globalvar.ll [new file with mode: 0644]