[LTO] Move finishOptimizationRemarks after codegen

This addresses the comment D26832.

llvm-svn: 288041
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 784f316..5aa91c4 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -567,8 +567,6 @@
   // Run our queue of passes all at once now, efficiently.
   passes.run(*MergedModule);
 
-  finishOptimizationRemarks();
-
   return true;
 }
 
@@ -604,6 +602,8 @@
   if (llvm::AreStatisticsEnabled())
     llvm::PrintStatistics();
 
+  finishOptimizationRemarks();
+
   return true;
 }