From 3d22724c8586211b3ece6f9f68b41c01c67f4b05 Mon Sep 17 00:00:00 2001 From: Dehao Chen Date: Thu, 19 Jan 2017 23:20:31 +0000 Subject: [PATCH] clang-format SampleProfile.cpp (NFC) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292533 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/SampleProfile.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Transforms/IPO/SampleProfile.cpp b/lib/Transforms/IPO/SampleProfile.cpp index 6a43f8dbac4..7eaf843b40a 100644 --- a/lib/Transforms/IPO/SampleProfile.cpp +++ b/lib/Transforms/IPO/SampleProfile.cpp @@ -451,8 +451,7 @@ void SampleProfileLoader::printBlockWeight(raw_ostream &OS, /// \param Inst Instruction to query. /// /// \returns the weight of \p Inst. -ErrorOr -SampleProfileLoader::getInstWeight(const Instruction &Inst) { +ErrorOr SampleProfileLoader::getInstWeight(const Instruction &Inst) { const DebugLoc &DLoc = Inst.getDebugLoc(); if (!DLoc) return std::error_code(); @@ -491,8 +490,8 @@ SampleProfileLoader::getInstWeight(const Instruction &Inst) { LLVMContext &Ctx = F->getContext(); emitOptimizationRemark( Ctx, DEBUG_TYPE, *F, DLoc, - Twine("Applied ") + Twine(*R) + " samples from profile (offset: " + - Twine(LineOffset) + + Twine("Applied ") + Twine(*R) + + " samples from profile (offset: " + Twine(LineOffset) + ((Discriminator) ? Twine(".") + Twine(Discriminator) : "") + ")"); } DEBUG(dbgs() << " " << Lineno << "." << DIL->getDiscriminator() << ":" @@ -511,8 +510,7 @@ SampleProfileLoader::getInstWeight(const Instruction &Inst) { /// \param BB The basic block to query. /// /// \returns the weight for \p BB. -ErrorOr -SampleProfileLoader::getBlockWeight(const BasicBlock *BB) { +ErrorOr SampleProfileLoader::getBlockWeight(const BasicBlock *BB) { uint64_t Max = 0; bool HasWeight = false; for (auto &I : BB->getInstList()) { -- 2.50.1