[PATCH] D21669: BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 19:05:06 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL273638: BitcodeWriter: Remove redundant (and incorrect) check for whether to emit… (authored by pcc).

Changed prior to commit:
  http://reviews.llvm.org/D21669?vs=61748&id=61753#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21669

Files:
  llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/trunk/test/Bitcode/thinlto-summary-globalvar.ll

Index: llvm/trunk/test/Bitcode/thinlto-summary-globalvar.ll
===================================================================
--- llvm/trunk/test/Bitcode/thinlto-summary-globalvar.ll
+++ llvm/trunk/test/Bitcode/thinlto-summary-globalvar.ll
@@ -0,0 +1,5 @@
+; RUN: opt -module-summary %s -o - | llvm-bcanalyzer -dump | FileCheck %s
+
+; CHECK: <GLOBALVAL_SUMMARY_BLOCK
+
+ at a = global i32 0
Index: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3271,9 +3271,6 @@
 /// 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;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21669.61753.patch
Type: text/x-patch
Size: 881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160624/8661f245/attachment.bin>


More information about the llvm-commits mailing list