[llvm] 9a259f4 - [Transforms] SampleProfileLoaderBaseImpl<BT>::getFunctionLoc - fix Wdocumentation warnings. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 06:06:49 PST 2021


Author: Simon Pilgrim
Date: 2021-03-11T14:04:08Z
New Revision: 9a259f4386b5e525c5009275ea628fc484f68805

URL: https://github.com/llvm/llvm-project/commit/9a259f4386b5e525c5009275ea628fc484f68805
DIFF: https://github.com/llvm/llvm-project/commit/9a259f4386b5e525c5009275ea628fc484f68805.diff

LOG: [Transforms] SampleProfileLoaderBaseImpl<BT>::getFunctionLoc - fix Wdocumentation warnings. NFCI.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
index 7a4339ee0b3b..d29f3bf91a70 100644
--- a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
+++ b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
@@ -888,9 +888,9 @@ void SampleProfileLoaderBaseImpl<BT>::emitCoverageRemarks(FunctionT &F) {
 /// \returns the line number where \p F is defined. If it returns 0,
 ///          it means that there is no debug information available for \p F.
 template <typename BT>
-unsigned SampleProfileLoaderBaseImpl<BT>::getFunctionLoc(FunctionT &Func) {
-  const Function &F = getFunction(Func);
-  if (DISubprogram *S = F.getSubprogram())
+unsigned SampleProfileLoaderBaseImpl<BT>::getFunctionLoc(FunctionT &F) {
+  const Function &Func = getFunction(F);
+  if (DISubprogram *S = Func.getSubprogram())
     return S->getLine();
 
   if (NoWarnSampleUnused)
@@ -898,8 +898,8 @@ unsigned SampleProfileLoaderBaseImpl<BT>::getFunctionLoc(FunctionT &Func) {
 
   // If the start of \p F is missing, emit a diagnostic to inform the user
   // about the missed opportunity.
-  F.getContext().diagnose(DiagnosticInfoSampleProfile(
-      "No debug information found in function " + F.getName() +
+  Func.getContext().diagnose(DiagnosticInfoSampleProfile(
+      "No debug information found in function " + Func.getName() +
           ": Function profile not used",
       DS_Warning));
   return 0;


        


More information about the llvm-commits mailing list