diff options
author | Rong Xu <xur@google.com> | 2019-03-01 17:50:20 +0000 |
---|---|---|
committer | Rong Xu <xur@google.com> | 2019-03-01 17:50:20 +0000 |
commit | 2e6e357759019c2f9ee476a9b6f4c307215277c9 (patch) | |
tree | 52d5030c122d154efb683dd97b7bab2f244e20bb /lib/CodeGen/CodeGenModule.cpp | |
parent | 1eca87b9ff95080cce84b99617a8e05db088cb6a (diff) | |
download | clang-2e6e357759019c2f9ee476a9b6f4c307215277c9.tar.gz |
[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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |