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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user