diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-24 01:58:02 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-24 01:58:02 +0000 |
commit | b19924a425edc9ff045fd20c794a6ec9917ba824 (patch) | |
tree | 65e459a4b78c3dc1810c4ece234cbcb46e805084 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | d9c39fcbcad1dd38954fef547ad77b7674b97052 (diff) | |
download | llvm-b19924a425edc9ff045fd20c794a6ec9917ba824.zip llvm-b19924a425edc9ff045fd20c794a6ec9917ba824.tar.gz llvm-b19924a425edc9ff045fd20c794a6ec9917ba824.tar.bz2 |
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
llvm-svn: 273638
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 20cbc2b..971d21e 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -3271,9 +3271,6 @@ static const uint64_t INDEX_VERSION = 1; /// Emit the per-module summary section alongside the rest of /// the module's bitcode. void ModuleBitcodeWriter::writePerModuleGlobalValueSummary() { - if (M.empty()) - return; - if (Index->begin() == Index->end()) return; |