]> granicus.if.org Git - clang/commitdiff
[PGO] Use the explicit parameter in ProfileSummary API. NFC
authorRong Xu <xur@google.com>
Fri, 1 Mar 2019 17:50:20 +0000 (17:50 +0000)
committerRong Xu <xur@google.com>
Fri, 1 Mar 2019 17:50:20 +0000 (17:50 +0000)
Use the explicit parameter in setProfileSummary() and getSummary().
This is a follow-up of r355131.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355209 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index 8ea8128ceabb36704d65c519d0ce88ceed570425..13fa3e780fd8e2ac84cdbea8b5d04ca52c1571d9 100644 (file)
@@ -52,6 +52,7 @@
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
+#include "llvm/IR/ProfileSummary.h"
 #include "llvm/ProfileData/InstrProfReader.h"
 #include "llvm/Support/CodeGen.h"
 #include "llvm/Support/ConvertUTF.h"
@@ -417,7 +418,9 @@ void CodeGenModule::Release() {
     OpenMPRuntime->clear();
   }
   if (PGOReader) {
-    getModule().setProfileSummary(PGOReader->getSummary().getMD(VMContext));
+    getModule().setProfileSummary(
+        PGOReader->getSummary(/* UseCS */ false).getMD(VMContext),
+        llvm::ProfileSummary::PSK_Instr);
     if (PGOStats.hasDiagnostics())
       PGOStats.reportDiagnostics(getDiags(), getCodeGenOpts().MainFileName);
   }