[PATCH] D24061: NFC fix doxygen comments

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 17:26:07 PDT 2016


eraman added inline comments.

================
Comment at: include/llvm/IR/Function.h:114
@@ -113,4 +113,3 @@
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
-
-  Type *getReturnType() const;           // Return the type of the ret val
-  FunctionType *getFunctionType() const; // Return the FunctionType for me
+  /// \brief Returns the type of the ret val
+  Type *getReturnType() const;
----------------
I believe you don't need a \brief if it is an one line comment.

================
Comment at: include/llvm/IR/Function.h:197
@@ -195,2 +196,3 @@
 
-  /// Set the entry count for this function.
+  /// Set the entry count for this function - the number of times function have
+  /// been executed based on pgo data.
----------------
This is a good place to use \brief. Something like
/// \brief Set the entry count for this function.
///
/// Entry count is the number of times the function is called and is obtained based on profile information

================
Comment at: include/llvm/IR/Function.h:201
@@ -198,2 +200,3 @@
 
-  /// Get the entry count for this function.
+  /// Get the entry count for this function - the number of times function have
+  /// been executed based on pgo data.
----------------
Same as above

================
Comment at: lib/Analysis/InlineCost.cpp:128
@@ -127,3 +127,3 @@
 
-  // Custom simplification helper routines.
+  /* Custom simplification helper routines. */
   bool isAllocaDerivedArg(Value *V);
----------------
http://llvm.org/docs/CodingStandards.html#comment-formatting says "prefer C++ style comments"


https://reviews.llvm.org/D24061





More information about the llvm-commits mailing list