From: Rong Xu Date: Fri, 1 Mar 2019 17:50:20 +0000 (+0000) Subject: [PGO] Use the explicit parameter in ProfileSummary API. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e6e357759019c2f9ee476a9b6f4c307215277c9;p=clang [PGO] Use the explicit parameter in ProfileSummary API. NFC 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 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 8ea8128cea..13fa3e780f 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -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); }