[BOLT][NFC] Make ICP::verifyProfile static

Follow LLVM style guide suggestion to avoid function definitions in anonymous
namespaces: https://llvm.org/docs/CodingStandards.html#anonymous-namespaces

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124896
This commit is contained in:
Amir Ayupov 2022-06-02 19:08:59 -07:00
parent b917433835
commit e2142ff47c
1 changed files with 3 additions and 7 deletions

View File

@ -127,12 +127,7 @@ static cl::opt<bool> ICPPeelForInline(
} // namespace opts } // namespace opts
namespace llvm { static bool verifyProfile(std::map<uint64_t, BinaryFunction> &BFs) {
namespace bolt {
namespace {
bool verifyProfile(std::map<uint64_t, BinaryFunction> &BFs) {
bool IsValid = true; bool IsValid = true;
for (auto &BFI : BFs) { for (auto &BFI : BFs) {
BinaryFunction &BF = BFI.second; BinaryFunction &BF = BFI.second;
@ -157,7 +152,8 @@ bool verifyProfile(std::map<uint64_t, BinaryFunction> &BFs) {
return IsValid; return IsValid;
} }
} // namespace namespace llvm {
namespace bolt {
IndirectCallPromotion::Callsite::Callsite(BinaryFunction &BF, IndirectCallPromotion::Callsite::Callsite(BinaryFunction &BF,
const IndirectCallProfile &ICP) const IndirectCallProfile &ICP)