Fix Doxygen issues:

* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph).

llvm-svn: 163790
This commit is contained in:
Dmitri Gribenko 2012-09-13 12:34:29 +00:00
parent 255f6a5f1a
commit 2bc1d483fe
17 changed files with 222 additions and 221 deletions

View File

@ -251,7 +251,7 @@ public:
/// constructor. /// constructor.
APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
/// This constructor interprets the string \arg str in the given radix. The /// This constructor interprets the string \p str in the given radix. The
/// interpretation stops when the first character that is not suitable for the /// interpretation stops when the first character that is not suitable for the
/// radix is encountered, or the end of the string. Acceptable radix values /// radix is encountered, or the end of the string. Acceptable radix values
/// are 2, 8, 10, 16, and 36. It is an error for the value implied by the /// are 2, 8, 10, 16, and 36. It is an error for the value implied by the
@ -1231,7 +1231,7 @@ public:
} }
/// This method determines how many bits are required to hold the APInt /// This method determines how many bits are required to hold the APInt
/// equivalent of the string given by \arg str. /// equivalent of the string given by \p str.
/// @brief Get bits required for string value. /// @brief Get bits required for string value.
static unsigned getBitsNeeded(StringRef str, uint8_t radix); static unsigned getBitsNeeded(StringRef str, uint8_t radix);

View File

@ -57,8 +57,9 @@ public:
/// ///
/// \param Dependencies The list of dependencies amongst changes. For each /// \param Dependencies The list of dependencies amongst changes. For each
/// (x,y) in \arg Dependencies, both x and y must be in \arg Changes. The /// (x,y) in \arg Dependencies, both x and y must be in \arg Changes. The
/// minimization algorithm guarantees that for each tested changed set S, x /// minimization algorithm guarantees that for each tested changed set S,
/// \in S implies y \in S. It is an error to have cyclic dependencies. /// \f$ x \in S \f$ implies \f$ y \in S \f$. It is an error to have cyclic
/// dependencies.
changeset_ty Run(const changeset_ty &Changes, changeset_ty Run(const changeset_ty &Changes,
const std::vector<edge_ty> &Dependencies); const std::vector<edge_ty> &Dependencies);

View File

@ -44,25 +44,25 @@ public:
/// @name String Assignment /// @name String Assignment
/// @{ /// @{
/// Assign from a repeated element /// Assign from a repeated element.
void assign(size_t NumElts, char Elt) { void assign(size_t NumElts, char Elt) {
this->SmallVectorImpl<char>::assign(NumElts, Elt); this->SmallVectorImpl<char>::assign(NumElts, Elt);
} }
/// Assign from an iterator pair /// Assign from an iterator pair.
template<typename in_iter> template<typename in_iter>
void assign(in_iter S, in_iter E) { void assign(in_iter S, in_iter E) {
this->clear(); this->clear();
SmallVectorImpl<char>::append(S, E); SmallVectorImpl<char>::append(S, E);
} }
/// Assign from a StringRef /// Assign from a StringRef.
void assign(StringRef RHS) { void assign(StringRef RHS) {
this->clear(); this->clear();
SmallVectorImpl<char>::append(RHS.begin(), RHS.end()); SmallVectorImpl<char>::append(RHS.begin(), RHS.end());
} }
/// Assign from a SmallVector /// Assign from a SmallVector.
void assign(const SmallVectorImpl<char> &RHS) { void assign(const SmallVectorImpl<char> &RHS) {
this->clear(); this->clear();
SmallVectorImpl<char>::append(RHS.begin(), RHS.end()); SmallVectorImpl<char>::append(RHS.begin(), RHS.end());
@ -72,7 +72,7 @@ public:
/// @name String Concatenation /// @name String Concatenation
/// @{ /// @{
/// Append from an iterator pair /// Append from an iterator pair.
template<typename in_iter> template<typename in_iter>
void append(in_iter S, in_iter E) { void append(in_iter S, in_iter E) {
SmallVectorImpl<char>::append(S, E); SmallVectorImpl<char>::append(S, E);
@ -83,12 +83,12 @@ public:
} }
/// Append from a StringRef /// Append from a StringRef.
void append(StringRef RHS) { void append(StringRef RHS) {
SmallVectorImpl<char>::append(RHS.begin(), RHS.end()); SmallVectorImpl<char>::append(RHS.begin(), RHS.end());
} }
/// Append from a SmallVector /// Append from a SmallVector.
void append(const SmallVectorImpl<char> &RHS) { void append(const SmallVectorImpl<char> &RHS) {
SmallVectorImpl<char>::append(RHS.begin(), RHS.end()); SmallVectorImpl<char>::append(RHS.begin(), RHS.end());
} }
@ -97,19 +97,19 @@ public:
/// @name String Comparison /// @name String Comparison
/// @{ /// @{
/// equals - Check for string equality, this is more efficient than /// Check for string equality. This is more efficient than compare() when
/// compare() when the relative ordering of inequal strings isn't needed. /// the relative ordering of inequal strings isn't needed.
bool equals(StringRef RHS) const { bool equals(StringRef RHS) const {
return str().equals(RHS); return str().equals(RHS);
} }
/// equals_lower - Check for string equality, ignoring case. /// Check for string equality, ignoring case.
bool equals_lower(StringRef RHS) const { bool equals_lower(StringRef RHS) const {
return str().equals_lower(RHS); return str().equals_lower(RHS);
} }
/// compare - Compare two strings; the result is -1, 0, or 1 if this string /// Compare two strings; the result is -1, 0, or 1 if this string is
/// is lexicographically less than, equal to, or greater than the \arg RHS. /// lexicographically less than, equal to, or greater than the \p RHS.
int compare(StringRef RHS) const { int compare(StringRef RHS) const {
return str().compare(RHS); return str().compare(RHS);
} }
@ -129,12 +129,12 @@ public:
/// @name String Predicates /// @name String Predicates
/// @{ /// @{
/// startswith - Check if this string starts with the given \arg Prefix. /// startswith - Check if this string starts with the given \p Prefix.
bool startswith(StringRef Prefix) const { bool startswith(StringRef Prefix) const {
return str().startswith(Prefix); return str().startswith(Prefix);
} }
/// endswith - Check if this string ends with the given \arg Suffix. /// endswith - Check if this string ends with the given \p Suffix.
bool endswith(StringRef Suffix) const { bool endswith(StringRef Suffix) const {
return str().endswith(Suffix); return str().endswith(Suffix);
} }
@ -143,76 +143,76 @@ public:
/// @name String Searching /// @name String Searching
/// @{ /// @{
/// find - Search for the first character \arg C in the string. /// find - Search for the first character \p C in the string.
/// ///
/// \return - The index of the first occurrence of \arg C, or npos if not /// \return - The index of the first occurrence of \p C, or npos if not
/// found. /// found.
size_t find(char C, size_t From = 0) const { size_t find(char C, size_t From = 0) const {
return str().find(C, From); return str().find(C, From);
} }
/// find - Search for the first string \arg Str in the string. /// Search for the first string \p Str in the string.
/// ///
/// \return - The index of the first occurrence of \arg Str, or npos if not /// \returns The index of the first occurrence of \p Str, or npos if not
/// found. /// found.
size_t find(StringRef Str, size_t From = 0) const { size_t find(StringRef Str, size_t From = 0) const {
return str().find(Str, From); return str().find(Str, From);
} }
/// rfind - Search for the last character \arg C in the string. /// Search for the last character \p C in the string.
/// ///
/// \return - The index of the last occurrence of \arg C, or npos if not /// \returns The index of the last occurrence of \p C, or npos if not
/// found. /// found.
size_t rfind(char C, size_t From = StringRef::npos) const { size_t rfind(char C, size_t From = StringRef::npos) const {
return str().rfind(C, From); return str().rfind(C, From);
} }
/// rfind - Search for the last string \arg Str in the string. /// Search for the last string \p Str in the string.
/// ///
/// \return - The index of the last occurrence of \arg Str, or npos if not /// \returns The index of the last occurrence of \p Str, or npos if not
/// found. /// found.
size_t rfind(StringRef Str) const { size_t rfind(StringRef Str) const {
return str().rfind(Str); return str().rfind(Str);
} }
/// find_first_of - Find the first character in the string that is \arg C, /// Find the first character in the string that is \p C, or npos if not
/// or npos if not found. Same as find. /// found. Same as find.
size_t find_first_of(char C, size_t From = 0) const { size_t find_first_of(char C, size_t From = 0) const {
return str().find_first_of(C, From); return str().find_first_of(C, From);
} }
/// find_first_of - Find the first character in the string that is in \arg /// Find the first character in the string that is in \p Chars, or npos if
/// Chars, or npos if not found. /// not found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_t find_first_of(StringRef Chars, size_t From = 0) const { size_t find_first_of(StringRef Chars, size_t From = 0) const {
return str().find_first_of(Chars, From); return str().find_first_of(Chars, From);
} }
/// find_first_not_of - Find the first character in the string that is not /// Find the first character in the string that is not \p C or npos if not
/// \arg C or npos if not found. /// found.
size_t find_first_not_of(char C, size_t From = 0) const { size_t find_first_not_of(char C, size_t From = 0) const {
return str().find_first_not_of(C, From); return str().find_first_not_of(C, From);
} }
/// find_first_not_of - Find the first character in the string that is not /// Find the first character in the string that is not in the string
/// in the string \arg Chars, or npos if not found. /// \p Chars, or npos if not found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_t find_first_not_of(StringRef Chars, size_t From = 0) const { size_t find_first_not_of(StringRef Chars, size_t From = 0) const {
return str().find_first_not_of(Chars, From); return str().find_first_not_of(Chars, From);
} }
/// find_last_of - Find the last character in the string that is \arg C, or /// Find the last character in the string that is \p C, or npos if not
/// npos if not found. /// found.
size_t find_last_of(char C, size_t From = StringRef::npos) const { size_t find_last_of(char C, size_t From = StringRef::npos) const {
return str().find_last_of(C, From); return str().find_last_of(C, From);
} }
/// find_last_of - Find the last character in the string that is in \arg C, /// Find the last character in the string that is in \p C, or npos if not
/// or npos if not found. /// found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_t find_last_of( size_t find_last_of(
StringRef Chars, size_t From = StringRef::npos) const { StringRef Chars, size_t From = StringRef::npos) const {
return str().find_last_of(Chars, From); return str().find_last_of(Chars, From);
@ -222,13 +222,13 @@ public:
/// @name Helpful Algorithms /// @name Helpful Algorithms
/// @{ /// @{
/// count - Return the number of occurrences of \arg C in the string. /// Return the number of occurrences of \p C in the string.
size_t count(char C) const { size_t count(char C) const {
return str().count(C); return str().count(C);
} }
/// count - Return the number of non-overlapped occurrences of \arg Str in /// Return the number of non-overlapped occurrences of \p Str in the
/// the string. /// string.
size_t count(StringRef Str) const { size_t count(StringRef Str) const {
return str().count(Str); return str().count(Str);
} }
@ -237,36 +237,36 @@ public:
/// @name Substring Operations /// @name Substring Operations
/// @{ /// @{
/// substr - Return a reference to the substring from [Start, Start + N). /// Return a reference to the substring from [Start, Start + N).
/// ///
/// \param Start - The index of the starting character in the substring; if /// \param Start The index of the starting character in the substring; if
/// the index is npos or greater than the length of the string then the /// the index is npos or greater than the length of the string then the
/// empty substring will be returned. /// empty substring will be returned.
/// ///
/// \param N - The number of characters to included in the substring. If N /// \param N The number of characters to included in the substring. If \p N
/// exceeds the number of characters remaining in the string, the string /// exceeds the number of characters remaining in the string, the string
/// suffix (starting with \arg Start) will be returned. /// suffix (starting with \p Start) will be returned.
StringRef substr(size_t Start, size_t N = StringRef::npos) const { StringRef substr(size_t Start, size_t N = StringRef::npos) const {
return str().substr(Start, N); return str().substr(Start, N);
} }
/// slice - Return a reference to the substring from [Start, End). /// Return a reference to the substring from [Start, End).
/// ///
/// \param Start - The index of the starting character in the substring; if /// \param Start The index of the starting character in the substring; if
/// the index is npos or greater than the length of the string then the /// the index is npos or greater than the length of the string then the
/// empty substring will be returned. /// empty substring will be returned.
/// ///
/// \param End - The index following the last character to include in the /// \param End The index following the last character to include in the
/// substring. If this is npos, or less than \arg Start, or exceeds the /// substring. If this is npos, or less than \p Start, or exceeds the
/// number of characters remaining in the string, the string suffix /// number of characters remaining in the string, the string suffix
/// (starting with \arg Start) will be returned. /// (starting with \p Start) will be returned.
StringRef slice(size_t Start, size_t End) const { StringRef slice(size_t Start, size_t End) const {
return str().slice(Start, End); return str().slice(Start, End);
} }
// Extra methods. // Extra methods.
/// Explicit conversion to StringRef /// Explicit conversion to StringRef.
StringRef str() const { return StringRef(this->begin(), this->size()); } StringRef str() const { return StringRef(this->begin(), this->size()); }
// TODO: Make this const, if it's safe... // TODO: Make this const, if it's safe...

View File

@ -684,8 +684,8 @@ public:
RHS.begin(), RHS.end()); RHS.begin(), RHS.end());
} }
/// set_size - Set the array size to \arg N, which the current array must have /// Set the array size to \p N, which the current array must have enough
/// enough capacity for. /// capacity for.
/// ///
/// This does not construct or destroy any elements in the vector. /// This does not construct or destroy any elements in the vector.
/// ///

View File

@ -21,7 +21,7 @@ namespace llvm {
template<typename T> class SmallVectorImpl; template<typename T> class SmallVectorImpl;
/// hexdigit - Return the hexadecimal character for the /// hexdigit - Return the hexadecimal character for the
/// given number \arg X (which should be less than 16). /// given number \p X (which should be less than 16).
static inline char hexdigit(unsigned X, bool LowerCase = false) { static inline char hexdigit(unsigned X, bool LowerCase = false) {
const char HexChar = LowerCase ? 'a' : 'A'; const char HexChar = LowerCase ? 'a' : 'A';
return X < 10 ? '0' + X : HexChar + X - 10; return X < 10 ? '0' + X : HexChar + X - 10;

View File

@ -138,7 +138,7 @@ namespace llvm {
} }
/// compare - Compare two strings; the result is -1, 0, or 1 if this string /// compare - Compare two strings; the result is -1, 0, or 1 if this string
/// is lexicographically less than, equal to, or greater than the \arg RHS. /// is lexicographically less than, equal to, or greater than the \p RHS.
int compare(StringRef RHS) const { int compare(StringRef RHS) const {
// Check the prefix for a mismatch. // Check the prefix for a mismatch.
if (int Res = compareMemory(Data, RHS.Data, min(Length, RHS.Length))) if (int Res = compareMemory(Data, RHS.Data, min(Length, RHS.Length)))
@ -205,13 +205,13 @@ namespace llvm {
/// @name String Predicates /// @name String Predicates
/// @{ /// @{
/// startswith - Check if this string starts with the given \arg Prefix. /// Check if this string starts with the given \p Prefix.
bool startswith(StringRef Prefix) const { bool startswith(StringRef Prefix) const {
return Length >= Prefix.Length && return Length >= Prefix.Length &&
compareMemory(Data, Prefix.Data, Prefix.Length) == 0; compareMemory(Data, Prefix.Data, Prefix.Length) == 0;
} }
/// endswith - Check if this string ends with the given \arg Suffix. /// Check if this string ends with the given \p Suffix.
bool endswith(StringRef Suffix) const { bool endswith(StringRef Suffix) const {
return Length >= Suffix.Length && return Length >= Suffix.Length &&
compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) == 0; compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) == 0;
@ -221,9 +221,9 @@ namespace llvm {
/// @name String Searching /// @name String Searching
/// @{ /// @{
/// find - Search for the first character \arg C in the string. /// Search for the first character \p C in the string.
/// ///
/// \return - The index of the first occurrence of \arg C, or npos if not /// \returns The index of the first occurrence of \p C, or npos if not
/// found. /// found.
size_t find(char C, size_t From = 0) const { size_t find(char C, size_t From = 0) const {
for (size_t i = min(From, Length), e = Length; i != e; ++i) for (size_t i = min(From, Length), e = Length; i != e; ++i)
@ -232,15 +232,15 @@ namespace llvm {
return npos; return npos;
} }
/// find - Search for the first string \arg Str in the string. /// Search for the first string \p Str in the string.
/// ///
/// \return - The index of the first occurrence of \arg Str, or npos if not /// \returns The index of the first occurrence of \p Str, or npos if not
/// found. /// found.
size_t find(StringRef Str, size_t From = 0) const; size_t find(StringRef Str, size_t From = 0) const;
/// rfind - Search for the last character \arg C in the string. /// Search for the last character \p C in the string.
/// ///
/// \return - The index of the last occurrence of \arg C, or npos if not /// \returns The index of the last occurrence of \p C, or npos if not
/// found. /// found.
size_t rfind(char C, size_t From = npos) const { size_t rfind(char C, size_t From = npos) const {
From = min(From, Length); From = min(From, Length);
@ -253,61 +253,61 @@ namespace llvm {
return npos; return npos;
} }
/// rfind - Search for the last string \arg Str in the string. /// Search for the last string \p Str in the string.
/// ///
/// \return - The index of the last occurrence of \arg Str, or npos if not /// \returns The index of the last occurrence of \p Str, or npos if not
/// found. /// found.
size_t rfind(StringRef Str) const; size_t rfind(StringRef Str) const;
/// find_first_of - Find the first character in the string that is \arg C, /// Find the first character in the string that is \p C, or npos if not
/// or npos if not found. Same as find. /// found. Same as find.
size_type find_first_of(char C, size_t From = 0) const { size_type find_first_of(char C, size_t From = 0) const {
return find(C, From); return find(C, From);
} }
/// find_first_of - Find the first character in the string that is in \arg /// Find the first character in the string that is in \p Chars, or npos if
/// Chars, or npos if not found. /// not found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_type find_first_of(StringRef Chars, size_t From = 0) const; size_type find_first_of(StringRef Chars, size_t From = 0) const;
/// find_first_not_of - Find the first character in the string that is not /// Find the first character in the string that is not \p C or npos if not
/// \arg C or npos if not found. /// found.
size_type find_first_not_of(char C, size_t From = 0) const; size_type find_first_not_of(char C, size_t From = 0) const;
/// find_first_not_of - Find the first character in the string that is not /// Find the first character in the string that is not in the string
/// in the string \arg Chars, or npos if not found. /// \p Chars, or npos if not found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_type find_first_not_of(StringRef Chars, size_t From = 0) const; size_type find_first_not_of(StringRef Chars, size_t From = 0) const;
/// find_last_of - Find the last character in the string that is \arg C, or /// Find the last character in the string that is \p C, or npos if not
/// npos if not found. /// found.
size_type find_last_of(char C, size_t From = npos) const { size_type find_last_of(char C, size_t From = npos) const {
return rfind(C, From); return rfind(C, From);
} }
/// find_last_of - Find the last character in the string that is in \arg C, /// Find the last character in the string that is in \p C, or npos if not
/// or npos if not found. /// found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_type find_last_of(StringRef Chars, size_t From = npos) const; size_type find_last_of(StringRef Chars, size_t From = npos) const;
/// find_last_not_of - Find the last character in the string that is not /// Find the last character in the string that is not \p C, or npos if not
/// \arg C, or npos if not found. /// found.
size_type find_last_not_of(char C, size_t From = npos) const; size_type find_last_not_of(char C, size_t From = npos) const;
/// find_last_not_of - Find the last character in the string that is not in /// Find the last character in the string that is not in \p Chars, or
/// \arg Chars, or npos if not found. /// npos if not found.
/// ///
/// Note: O(size() + Chars.size()) /// Complexity: O(size() + Chars.size())
size_type find_last_not_of(StringRef Chars, size_t From = npos) const; size_type find_last_not_of(StringRef Chars, size_t From = npos) const;
/// @} /// @}
/// @name Helpful Algorithms /// @name Helpful Algorithms
/// @{ /// @{
/// count - Return the number of occurrences of \arg C in the string. /// Return the number of occurrences of \p C in the string.
size_t count(char C) const { size_t count(char C) const {
size_t Count = 0; size_t Count = 0;
for (size_t i = 0, e = Length; i != e; ++i) for (size_t i = 0, e = Length; i != e; ++i)
@ -316,18 +316,17 @@ namespace llvm {
return Count; return Count;
} }
/// count - Return the number of non-overlapped occurrences of \arg Str in /// Return the number of non-overlapped occurrences of \p Str in
/// the string. /// the string.
size_t count(StringRef Str) const; size_t count(StringRef Str) const;
/// getAsInteger - Parse the current string as an integer of the specified /// Parse the current string as an integer of the specified radix. If
/// radix. If Radix is specified as zero, this does radix autosensing using /// \p Radix is specified as zero, this does radix autosensing using
/// extended C rules: 0 is octal, 0x is hex, 0b is binary. /// extended C rules: 0 is octal, 0x is hex, 0b is binary.
/// ///
/// If the string is invalid or if only a subset of the string is valid, /// If the string is invalid or if only a subset of the string is valid,
/// this returns true to signify the error. The string is considered /// this returns true to signify the error. The string is considered
/// erroneous if empty or if it overflows T. /// erroneous if empty or if it overflows T.
///
template <typename T> template <typename T>
typename enable_if_c<std::numeric_limits<T>::is_signed, bool>::type typename enable_if_c<std::numeric_limits<T>::is_signed, bool>::type
getAsInteger(unsigned Radix, T &Result) const { getAsInteger(unsigned Radix, T &Result) const {
@ -350,13 +349,12 @@ namespace llvm {
return false; return false;
} }
/// getAsInteger - Parse the current string as an integer of the /// Parse the current string as an integer of the specified \p Radix, or of
/// specified radix, or of an autosensed radix if the radix given /// an autosensed radix if the \p Radix given is 0. The current value in
/// is 0. The current value in Result is discarded, and the /// \p Result is discarded, and the storage is changed to be wide enough to
/// storage is changed to be wide enough to store the parsed /// store the parsed integer.
/// integer.
/// ///
/// Returns true if the string does not solely consist of a valid /// \returns true if the string does not solely consist of a valid
/// non-empty number in the appropriate base. /// non-empty number in the appropriate base.
/// ///
/// APInt::fromString is superficially similar but assumes the /// APInt::fromString is superficially similar but assumes the
@ -367,70 +365,70 @@ namespace llvm {
/// @name String Operations /// @name String Operations
/// @{ /// @{
// lower - Convert the given ASCII string to lowercase. // Convert the given ASCII string to lowercase.
std::string lower() const; std::string lower() const;
/// upper - Convert the given ASCII string to uppercase. /// Convert the given ASCII string to uppercase.
std::string upper() const; std::string upper() const;
/// @} /// @}
/// @name Substring Operations /// @name Substring Operations
/// @{ /// @{
/// substr - Return a reference to the substring from [Start, Start + N). /// Return a reference to the substring from [Start, Start + N).
/// ///
/// \param Start - The index of the starting character in the substring; if /// \param Start The index of the starting character in the substring; if
/// the index is npos or greater than the length of the string then the /// the index is npos or greater than the length of the string then the
/// empty substring will be returned. /// empty substring will be returned.
/// ///
/// \param N - The number of characters to included in the substring. If N /// \param N The number of characters to included in the substring. If N
/// exceeds the number of characters remaining in the string, the string /// exceeds the number of characters remaining in the string, the string
/// suffix (starting with \arg Start) will be returned. /// suffix (starting with \p Start) will be returned.
StringRef substr(size_t Start, size_t N = npos) const { StringRef substr(size_t Start, size_t N = npos) const {
Start = min(Start, Length); Start = min(Start, Length);
return StringRef(Data + Start, min(N, Length - Start)); return StringRef(Data + Start, min(N, Length - Start));
} }
/// drop_front - Return a StringRef equal to 'this' but with the first /// Return a StringRef equal to 'this' but with the first \p N elements
/// elements dropped. /// dropped.
StringRef drop_front(unsigned N = 1) const { StringRef drop_front(unsigned N = 1) const {
assert(size() >= N && "Dropping more elements than exist"); assert(size() >= N && "Dropping more elements than exist");
return substr(N); return substr(N);
} }
/// drop_back - Return a StringRef equal to 'this' but with the last /// Return a StringRef equal to 'this' but with the last \p N elements
/// elements dropped. /// dropped.
StringRef drop_back(unsigned N = 1) const { StringRef drop_back(unsigned N = 1) const {
assert(size() >= N && "Dropping more elements than exist"); assert(size() >= N && "Dropping more elements than exist");
return substr(0, size()-N); return substr(0, size()-N);
} }
/// slice - Return a reference to the substring from [Start, End). /// Return a reference to the substring from [Start, End).
/// ///
/// \param Start - The index of the starting character in the substring; if /// \param Start The index of the starting character in the substring; if
/// the index is npos or greater than the length of the string then the /// the index is npos or greater than the length of the string then the
/// empty substring will be returned. /// empty substring will be returned.
/// ///
/// \param End - The index following the last character to include in the /// \param End The index following the last character to include in the
/// substring. If this is npos, or less than \arg Start, or exceeds the /// substring. If this is npos, or less than \p Start, or exceeds the
/// number of characters remaining in the string, the string suffix /// number of characters remaining in the string, the string suffix
/// (starting with \arg Start) will be returned. /// (starting with \p Start) will be returned.
StringRef slice(size_t Start, size_t End) const { StringRef slice(size_t Start, size_t End) const {
Start = min(Start, Length); Start = min(Start, Length);
End = min(max(Start, End), Length); End = min(max(Start, End), Length);
return StringRef(Data + Start, End - Start); return StringRef(Data + Start, End - Start);
} }
/// split - Split into two substrings around the first occurrence of a /// Split into two substrings around the first occurrence of a separator
/// separator character. /// character.
/// ///
/// If \arg Separator is in the string, then the result is a pair (LHS, RHS) /// If \p Separator is in the string, then the result is a pair (LHS, RHS)
/// such that (*this == LHS + Separator + RHS) is true and RHS is /// such that (*this == LHS + Separator + RHS) is true and RHS is
/// maximal. If \arg Separator is not in the string, then the result is a /// maximal. If \p Separator is not in the string, then the result is a
/// pair (LHS, RHS) where (*this == LHS) and (RHS == ""). /// pair (LHS, RHS) where (*this == LHS) and (RHS == "").
/// ///
/// \param Separator - The character to split on. /// \param Separator The character to split on.
/// \return - The split substrings. /// \returns The split substrings.
std::pair<StringRef, StringRef> split(char Separator) const { std::pair<StringRef, StringRef> split(char Separator) const {
size_t Idx = find(Separator); size_t Idx = find(Separator);
if (Idx == npos) if (Idx == npos)
@ -438,12 +436,12 @@ namespace llvm {
return std::make_pair(slice(0, Idx), slice(Idx+1, npos)); return std::make_pair(slice(0, Idx), slice(Idx+1, npos));
} }
/// split - Split into two substrings around the first occurrence of a /// Split into two substrings around the first occurrence of a separator
/// separator string. /// string.
/// ///
/// If \arg Separator is in the string, then the result is a pair (LHS, RHS) /// If \p Separator is in the string, then the result is a pair (LHS, RHS)
/// such that (*this == LHS + Separator + RHS) is true and RHS is /// such that (*this == LHS + Separator + RHS) is true and RHS is
/// maximal. If \arg Separator is not in the string, then the result is a /// maximal. If \p Separator is not in the string, then the result is a
/// pair (LHS, RHS) where (*this == LHS) and (RHS == ""). /// pair (LHS, RHS) where (*this == LHS) and (RHS == "").
/// ///
/// \param Separator - The string to split on. /// \param Separator - The string to split on.
@ -455,14 +453,13 @@ namespace llvm {
return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos)); return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos));
} }
/// split - Split into substrings around the occurrences of a separator /// Split into substrings around the occurrences of a separator string.
/// string.
/// ///
/// Each substring is stored in \arg A. If \arg MaxSplit is >= 0, at most /// Each substring is stored in \p A. If \p MaxSplit is >= 0, at most
/// \arg MaxSplit splits are done and consequently <= \arg MaxSplit /// \p MaxSplit splits are done and consequently <= \p MaxSplit
/// elements are added to A. /// elements are added to A.
/// If \arg KeepEmpty is false, empty strings are not added to \arg A. They /// If \p KeepEmpty is false, empty strings are not added to \p A. They
/// still count when considering \arg MaxSplit /// still count when considering \p MaxSplit
/// An useful invariant is that /// An useful invariant is that
/// Separator.join(A) == *this if MaxSplit == -1 and KeepEmpty == true /// Separator.join(A) == *this if MaxSplit == -1 and KeepEmpty == true
/// ///
@ -474,12 +471,12 @@ namespace llvm {
StringRef Separator, int MaxSplit = -1, StringRef Separator, int MaxSplit = -1,
bool KeepEmpty = true) const; bool KeepEmpty = true) const;
/// rsplit - Split into two substrings around the last occurrence of a /// Split into two substrings around the last occurrence of a separator
/// separator character. /// character.
/// ///
/// If \arg Separator is in the string, then the result is a pair (LHS, RHS) /// If \p Separator is in the string, then the result is a pair (LHS, RHS)
/// such that (*this == LHS + Separator + RHS) is true and RHS is /// such that (*this == LHS + Separator + RHS) is true and RHS is
/// minimal. If \arg Separator is not in the string, then the result is a /// minimal. If \p Separator is not in the string, then the result is a
/// pair (LHS, RHS) where (*this == LHS) and (RHS == ""). /// pair (LHS, RHS) where (*this == LHS) and (RHS == "").
/// ///
/// \param Separator - The character to split on. /// \param Separator - The character to split on.
@ -491,20 +488,20 @@ namespace llvm {
return std::make_pair(slice(0, Idx), slice(Idx+1, npos)); return std::make_pair(slice(0, Idx), slice(Idx+1, npos));
} }
/// ltrim - Return string with consecutive characters in \arg Chars starting /// Return string with consecutive characters in \p Chars starting from
/// from the left removed. /// the left removed.
StringRef ltrim(StringRef Chars = " \t\n\v\f\r") const { StringRef ltrim(StringRef Chars = " \t\n\v\f\r") const {
return drop_front(std::min(Length, find_first_not_of(Chars))); return drop_front(std::min(Length, find_first_not_of(Chars)));
} }
/// rtrim - Return string with consecutive characters in \arg Chars starting /// Return string with consecutive characters in \p Chars starting from
/// from the right removed. /// the right removed.
StringRef rtrim(StringRef Chars = " \t\n\v\f\r") const { StringRef rtrim(StringRef Chars = " \t\n\v\f\r") const {
return drop_back(Length - std::min(Length, find_last_not_of(Chars) + 1)); return drop_back(Length - std::min(Length, find_last_not_of(Chars) + 1));
} }
/// trim - Return string with consecutive characters in \arg Chars starting /// Return string with consecutive characters in \p Chars starting from
/// from the left and right removed. /// the left and right removed.
StringRef trim(StringRef Chars = " \t\n\v\f\r") const { StringRef trim(StringRef Chars = " \t\n\v\f\r") const {
return ltrim(Chars).rtrim(Chars); return ltrim(Chars).rtrim(Chars);
} }

View File

@ -342,7 +342,7 @@ public:
/// to a known type. /// to a known type.
void setEnvironment(EnvironmentType Kind); void setEnvironment(EnvironmentType Kind);
/// setTriple - Set all components to the new triple \arg Str. /// setTriple - Set all components to the new triple \p Str.
void setTriple(const Twine &Str); void setTriple(const Twine &Str);
/// setArchName - Set the architecture (first) component of the /// setArchName - Set the architecture (first) component of the
@ -393,11 +393,10 @@ public:
/// @name Static helpers for IDs. /// @name Static helpers for IDs.
/// @{ /// @{
/// getArchTypeName - Get the canonical name for the \arg Kind /// getArchTypeName - Get the canonical name for the \p Kind architecture.
/// architecture.
static const char *getArchTypeName(ArchType Kind); static const char *getArchTypeName(ArchType Kind);
/// getArchTypePrefix - Get the "prefix" canonical name for the \arg Kind /// getArchTypePrefix - Get the "prefix" canonical name for the \p Kind
/// architecture. This is the prefix used by the architecture specific /// architecture. This is the prefix used by the architecture specific
/// builtins, and is suitable for passing to \see /// builtins, and is suitable for passing to \see
/// Intrinsic::getIntrinsicForGCCBuiltin(). /// Intrinsic::getIntrinsicForGCCBuiltin().
@ -405,15 +404,13 @@ public:
/// \return - The architecture prefix, or 0 if none is defined. /// \return - The architecture prefix, or 0 if none is defined.
static const char *getArchTypePrefix(ArchType Kind); static const char *getArchTypePrefix(ArchType Kind);
/// getVendorTypeName - Get the canonical name for the \arg Kind /// getVendorTypeName - Get the canonical name for the \p Kind vendor.
/// vendor.
static const char *getVendorTypeName(VendorType Kind); static const char *getVendorTypeName(VendorType Kind);
/// getOSTypeName - Get the canonical name for the \arg Kind operating /// getOSTypeName - Get the canonical name for the \p Kind operating system.
/// system.
static const char *getOSTypeName(OSType Kind); static const char *getOSTypeName(OSType Kind);
/// getEnvironmentTypeName - Get the canonical name for the \arg Kind /// getEnvironmentTypeName - Get the canonical name for the \p Kind
/// environment. /// environment.
static const char *getEnvironmentTypeName(EnvironmentType Kind); static const char *getEnvironmentTypeName(EnvironmentType Kind);

View File

@ -44,7 +44,7 @@ namespace llvm {
/// itself, and renders as an empty string. This can be returned from APIs to /// itself, and renders as an empty string. This can be returned from APIs to
/// effectively nullify any concatenations performed on the result. /// effectively nullify any concatenations performed on the result.
/// ///
/// \b Implementation \n /// \b Implementation
/// ///
/// Given the nature of a Twine, it is not possible for the Twine's /// Given the nature of a Twine, it is not possible for the Twine's
/// concatenation method to construct interior nodes; the result must be /// concatenation method to construct interior nodes; the result must be
@ -67,7 +67,7 @@ namespace llvm {
/// ///
/// These invariants are check by \see isValid(). /// These invariants are check by \see isValid().
/// ///
/// \b Efficiency Considerations \n /// \b Efficiency Considerations
/// ///
/// The Twine is designed to yield efficient and small code for common /// The Twine is designed to yield efficient and small code for common
/// situations. For this reason, the concat() method is inlined so that /// situations. For this reason, the concat() method is inlined so that
@ -303,37 +303,37 @@ namespace llvm {
LHS.character = static_cast<char>(Val); LHS.character = static_cast<char>(Val);
} }
/// Construct a twine to print \arg Val as an unsigned decimal integer. /// Construct a twine to print \p Val as an unsigned decimal integer.
explicit Twine(unsigned Val) explicit Twine(unsigned Val)
: LHSKind(DecUIKind), RHSKind(EmptyKind) { : LHSKind(DecUIKind), RHSKind(EmptyKind) {
LHS.decUI = Val; LHS.decUI = Val;
} }
/// Construct a twine to print \arg Val as a signed decimal integer. /// Construct a twine to print \p Val as a signed decimal integer.
explicit Twine(int Val) explicit Twine(int Val)
: LHSKind(DecIKind), RHSKind(EmptyKind) { : LHSKind(DecIKind), RHSKind(EmptyKind) {
LHS.decI = Val; LHS.decI = Val;
} }
/// Construct a twine to print \arg Val as an unsigned decimal integer. /// Construct a twine to print \p Val as an unsigned decimal integer.
explicit Twine(const unsigned long &Val) explicit Twine(const unsigned long &Val)
: LHSKind(DecULKind), RHSKind(EmptyKind) { : LHSKind(DecULKind), RHSKind(EmptyKind) {
LHS.decUL = &Val; LHS.decUL = &Val;
} }
/// Construct a twine to print \arg Val as a signed decimal integer. /// Construct a twine to print \p Val as a signed decimal integer.
explicit Twine(const long &Val) explicit Twine(const long &Val)
: LHSKind(DecLKind), RHSKind(EmptyKind) { : LHSKind(DecLKind), RHSKind(EmptyKind) {
LHS.decL = &Val; LHS.decL = &Val;
} }
/// Construct a twine to print \arg Val as an unsigned decimal integer. /// Construct a twine to print \p Val as an unsigned decimal integer.
explicit Twine(const unsigned long long &Val) explicit Twine(const unsigned long long &Val)
: LHSKind(DecULLKind), RHSKind(EmptyKind) { : LHSKind(DecULLKind), RHSKind(EmptyKind) {
LHS.decULL = &Val; LHS.decULL = &Val;
} }
/// Construct a twine to print \arg Val as a signed decimal integer. /// Construct a twine to print \p Val as a signed decimal integer.
explicit Twine(const long long &Val) explicit Twine(const long long &Val)
: LHSKind(DecLLKind), RHSKind(EmptyKind) { : LHSKind(DecLLKind), RHSKind(EmptyKind) {
LHS.decLL = &Val; LHS.decLL = &Val;
@ -370,7 +370,7 @@ namespace llvm {
/// @name Numeric Conversions /// @name Numeric Conversions
/// @{ /// @{
// Construct a twine to print \arg Val as an unsigned hexadecimal integer. // Construct a twine to print \p Val as an unsigned hexadecimal integer.
static Twine utohexstr(const uint64_t &Val) { static Twine utohexstr(const uint64_t &Val) {
Child LHS, RHS; Child LHS, RHS;
LHS.uHex = &Val; LHS.uHex = &Val;
@ -447,17 +447,17 @@ namespace llvm {
/// The returned StringRef's size does not include the null terminator. /// The returned StringRef's size does not include the null terminator.
StringRef toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const; StringRef toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const;
/// print - Write the concatenated string represented by this twine to the /// Write the concatenated string represented by this twine to the
/// stream \arg OS. /// stream \p OS.
void print(raw_ostream &OS) const; void print(raw_ostream &OS) const;
/// dump - Dump the concatenated string represented by this twine to stderr. /// Dump the concatenated string represented by this twine to stderr.
void dump() const; void dump() const;
/// print - Write the representation of this twine to the stream \arg OS. /// Write the representation of this twine to the stream \p OS.
void printRepr(raw_ostream &OS) const; void printRepr(raw_ostream &OS) const;
/// dumpRepr - Dump the representation of this twine to stderr. /// Dump the representation of this twine to stderr.
void dumpRepr() const; void dumpRepr() const;
/// @} /// @}

View File

@ -1261,13 +1261,13 @@ public:
// Utility creation methods // Utility creation methods
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//
/// CreateIsNull - Return an i1 value testing if \arg Arg is null. /// CreateIsNull - Return an i1 value testing if \p Arg is null.
Value *CreateIsNull(Value *Arg, const Twine &Name = "") { Value *CreateIsNull(Value *Arg, const Twine &Name = "") {
return CreateICmpEQ(Arg, Constant::getNullValue(Arg->getType()), return CreateICmpEQ(Arg, Constant::getNullValue(Arg->getType()),
Name); Name);
} }
/// CreateIsNotNull - Return an i1 value testing if \arg Arg is not null. /// CreateIsNotNull - Return an i1 value testing if \p Arg is not null.
Value *CreateIsNotNull(Value *Arg, const Twine &Name = "") { Value *CreateIsNotNull(Value *Arg, const Twine &Name = "") {
return CreateICmpNE(Arg, Constant::getNullValue(Arg->getType()), return CreateICmpNE(Arg, Constant::getNullValue(Arg->getType()),
Name); Name);

View File

@ -431,21 +431,22 @@ inline uint64_t NextPowerOf2(uint64_t A) {
return A + 1; return A + 1;
} }
/// RoundUpToAlignment - Returns the next integer (mod 2**64) that is /// Returns the next integer (mod 2**64) that is greater than or equal to
/// greater than or equal to \arg Value and is a multiple of \arg /// \p Value and is a multiple of \p Align. \p Align must be non-zero.
/// Align. Align must be non-zero.
/// ///
/// Examples: /// Examples:
/// RoundUpToAlignment(5, 8) = 8 /// \code
/// RoundUpToAlignment(17, 8) = 24 /// RoundUpToAlignment(5, 8) = 8
/// RoundUpToAlignment(~0LL, 8) = 0 /// RoundUpToAlignment(17, 8) = 24
/// RoundUpToAlignment(~0LL, 8) = 0
/// \endcode
inline uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align) { inline uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align) {
return ((Value + Align - 1) / Align) * Align; return ((Value + Align - 1) / Align) * Align;
} }
/// OffsetToAlignment - Return the offset to the next integer (mod 2**64) that /// Returns the offset to the next integer (mod 2**64) that is greater than
/// is greater than or equal to \arg Value and is a multiple of \arg /// or equal to \p Value and is a multiple of \p Align. \p Align must be
/// Align. Align must be non-zero. /// non-zero.
inline uint64_t OffsetToAlignment(uint64_t Value, uint64_t Align) { inline uint64_t OffsetToAlignment(uint64_t Value, uint64_t Align) {
return RoundUpToAlignment(Value, Align) - Value; return RoundUpToAlignment(Value, Align) - Value;
} }

View File

@ -271,7 +271,7 @@ namespace llvm {
/// createMCAsmInfo - Create a MCAsmInfo implementation for the specified /// createMCAsmInfo - Create a MCAsmInfo implementation for the specified
/// target triple. /// target triple.
/// ///
/// \arg Triple - This argument is used to determine the target machine /// \param Triple This argument is used to determine the target machine
/// feature set; it should always be provided. Generally this should be /// feature set; it should always be provided. Generally this should be
/// either the target triple from the module, or the target triple of the /// either the target triple from the module, or the target triple of the
/// host if that does not exist. /// host if that does not exist.
@ -317,12 +317,12 @@ namespace llvm {
/// createMCSubtargetInfo - Create a MCSubtargetInfo implementation. /// createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
/// ///
/// \arg Triple - This argument is used to determine the target machine /// \param Triple This argument is used to determine the target machine
/// feature set; it should always be provided. Generally this should be /// feature set; it should always be provided. Generally this should be
/// either the target triple from the module, or the target triple of the /// either the target triple from the module, or the target triple of the
/// host if that does not exist. /// host if that does not exist.
/// \arg CPU - This specifies the name of the target CPU. /// \param CPU This specifies the name of the target CPU.
/// \arg Features - This specifies the string representation of the /// \param Features This specifies the string representation of the
/// additional target features. /// additional target features.
MCSubtargetInfo *createMCSubtargetInfo(StringRef Triple, StringRef CPU, MCSubtargetInfo *createMCSubtargetInfo(StringRef Triple, StringRef CPU,
StringRef Features) const { StringRef Features) const {
@ -332,9 +332,9 @@ namespace llvm {
} }
/// createTargetMachine - Create a target specific machine implementation /// createTargetMachine - Create a target specific machine implementation
/// for the specified \arg Triple. /// for the specified \p Triple.
/// ///
/// \arg Triple - This argument is used to determine the target machine /// \param Triple This argument is used to determine the target machine
/// feature set; it should always be provided. Generally this should be /// feature set; it should always be provided. Generally this should be
/// either the target triple from the module, or the target triple of the /// either the target triple from the module, or the target triple of the
/// host if that does not exist. /// host if that does not exist.
@ -351,8 +351,8 @@ namespace llvm {
/// createMCAsmBackend - Create a target specific assembly parser. /// createMCAsmBackend - Create a target specific assembly parser.
/// ///
/// \arg Triple - The target triple string. /// \param Triple The target triple string.
/// \arg Backend - The target independent assembler object. /// \param Backend The target independent assembler object.
MCAsmBackend *createMCAsmBackend(StringRef Triple) const { MCAsmBackend *createMCAsmBackend(StringRef Triple) const {
if (!MCAsmBackendCtorFn) if (!MCAsmBackendCtorFn)
return 0; return 0;
@ -370,7 +370,7 @@ namespace llvm {
/// createMCAsmParser - Create a target specific assembly parser. /// createMCAsmParser - Create a target specific assembly parser.
/// ///
/// \arg Parser - The target independent parser implementation to use for /// \param Parser The target independent parser implementation to use for
/// parsing and lexing. /// parsing and lexing.
MCTargetAsmParser *createMCAsmParser(MCSubtargetInfo &STI, MCTargetAsmParser *createMCAsmParser(MCSubtargetInfo &STI,
MCAsmParser &Parser) const { MCAsmParser &Parser) const {
@ -416,13 +416,13 @@ namespace llvm {
/// createMCObjectStreamer - Create a target specific MCStreamer. /// createMCObjectStreamer - Create a target specific MCStreamer.
/// ///
/// \arg TT - The target triple. /// \param TT The target triple.
/// \arg Ctx - The target context. /// \param Ctx The target context.
/// \arg TAB - The target assembler backend object. Takes ownership. /// \param TAB The target assembler backend object. Takes ownership.
/// \arg _OS - The stream object. /// \param _OS The stream object.
/// \arg _Emitter - The target independent assembler object.Takes ownership. /// \param _Emitter The target independent assembler object.Takes ownership.
/// \arg RelaxAll - Relax all fixups? /// \param RelaxAll Relax all fixups?
/// \arg NoExecStack - Mark file as not needing a executable stack. /// \param NoExecStack Mark file as not needing a executable stack.
MCStreamer *createMCObjectStreamer(StringRef TT, MCContext &Ctx, MCStreamer *createMCObjectStreamer(StringRef TT, MCContext &Ctx,
MCAsmBackend &TAB, MCAsmBackend &TAB,
raw_ostream &_OS, raw_ostream &_OS,

View File

@ -41,8 +41,8 @@ namespace llvm {
/// before llvm_start_multithreaded(). /// before llvm_start_multithreaded().
void llvm_release_global_lock(); void llvm_release_global_lock();
/// llvm_execute_on_thread - Execute the given \arg UserFn on a separate /// llvm_execute_on_thread - Execute the given \p UserFn on a separate
/// thread, passing it the provided \arg UserData. /// thread, passing it the provided \p UserData.
/// ///
/// This function does not guarantee that the code will actually be executed /// This function does not guarantee that the code will actually be executed
/// on a separate thread or honoring the requested stack size, but tries to do /// on a separate thread or honoring the requested stack size, but tries to do

View File

@ -191,10 +191,10 @@ public:
raw_ostream &operator<<(double N); raw_ostream &operator<<(double N);
/// write_hex - Output \arg N in hexadecimal, without any prefix or padding. /// write_hex - Output \p N in hexadecimal, without any prefix or padding.
raw_ostream &write_hex(unsigned long long N); raw_ostream &write_hex(unsigned long long N);
/// write_escaped - Output \arg Str, turning '\\', '\t', '\n', '"', and /// write_escaped - Output \p Str, turning '\\', '\t', '\n', '"', and
/// anything that doesn't satisfy std::isprint into an escape sequence. /// anything that doesn't satisfy std::isprint into an escape sequence.
raw_ostream &write_escaped(StringRef Str, bool UseHexEscapes = false); raw_ostream &write_escaped(StringRef Str, bool UseHexEscapes = false);
@ -245,15 +245,16 @@ public:
private: private:
/// write_impl - The is the piece of the class that is implemented /// write_impl - The is the piece of the class that is implemented
/// by subclasses. This writes the \args Size bytes starting at /// by subclasses. This writes the \p Size bytes starting at
/// \arg Ptr to the underlying stream. /// \p Ptr to the underlying stream.
/// ///
/// This function is guaranteed to only be called at a point at which it is /// This function is guaranteed to only be called at a point at which it is
/// safe for the subclass to install a new buffer via SetBuffer. /// safe for the subclass to install a new buffer via SetBuffer.
/// ///
/// \arg Ptr - The start of the data to be written. For buffered streams this /// \param Ptr The start of the data to be written. For buffered streams this
/// is guaranteed to be the start of the buffer. /// is guaranteed to be the start of the buffer.
/// \arg Size - The number of bytes to be written. ///
/// \param Size The number of bytes to be written.
/// ///
/// \invariant { Size > 0 } /// \invariant { Size > 0 }
virtual void write_impl(const char *Ptr, size_t Size) = 0; virtual void write_impl(const char *Ptr, size_t Size) = 0;
@ -473,7 +474,7 @@ class raw_svector_ostream : public raw_ostream {
public: public:
/// Construct a new raw_svector_ostream. /// Construct a new raw_svector_ostream.
/// ///
/// \arg O - The vector to write to; this should generally have at least 128 /// \param O The vector to write to; this should generally have at least 128
/// bytes free to avoid any extraneous memory overhead. /// bytes free to avoid any extraneous memory overhead.
explicit raw_svector_ostream(SmallVectorImpl<char> &O); explicit raw_svector_ostream(SmallVectorImpl<char> &O);
~raw_svector_ostream(); ~raw_svector_ostream();

View File

@ -120,7 +120,7 @@ public:
/// setName() - Change the name of the value, choosing a new unique name if /// setName() - Change the name of the value, choosing a new unique name if
/// the provided name is taken. /// the provided name is taken.
/// ///
/// \arg Name - The new name; or "" if the value's name should be removed. /// \param Name The new name; or "" if the value's name should be removed.
void setName(const Twine &Name); void setName(const Twine &Name);

View File

@ -662,6 +662,7 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
/// DupRetToEnableTailCallOpts - Look for opportunities to duplicate return /// DupRetToEnableTailCallOpts - Look for opportunities to duplicate return
/// instructions to the predecessor to enable tail call optimizations. The /// instructions to the predecessor to enable tail call optimizations. The
/// case it is currently looking for is: /// case it is currently looking for is:
/// @code
/// bb0: /// bb0:
/// %tmp0 = tail call i32 @f0() /// %tmp0 = tail call i32 @f0()
/// br label %return /// br label %return
@ -674,9 +675,11 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
/// return: /// return:
/// %retval = phi i32 [ %tmp0, %bb0 ], [ %tmp1, %bb1 ], [ %tmp2, %bb2 ] /// %retval = phi i32 [ %tmp0, %bb0 ], [ %tmp1, %bb1 ], [ %tmp2, %bb2 ]
/// ret i32 %retval /// ret i32 %retval
/// @endcode
/// ///
/// => /// =>
/// ///
/// @code
/// bb0: /// bb0:
/// %tmp0 = tail call i32 @f0() /// %tmp0 = tail call i32 @f0()
/// ret i32 %tmp0 /// ret i32 %tmp0
@ -686,7 +689,7 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
/// bb2: /// bb2:
/// %tmp2 = tail call i32 @f2() /// %tmp2 = tail call i32 @f2()
/// ret i32 %tmp2 /// ret i32 %tmp2
/// /// @endcode
bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) { bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
if (!TLI) if (!TLI)
return false; return false;

View File

@ -70,7 +70,7 @@ class ModFilter : public ModRMFilter {
public: public:
/// Constructor /// Constructor
/// ///
/// @r - True if the mod bits of the ModR/M byte must be 11; false /// \param r True if the mod bits of the ModR/M byte must be 11; false
/// otherwise. The name r derives from the fact that the mod /// otherwise. The name r derives from the fact that the mod
/// bits indicate whether the R/M bits [bits 2-0] signify a /// bits indicate whether the R/M bits [bits 2-0] signify a
/// register or a memory operand. /// register or a memory operand.
@ -98,11 +98,12 @@ class EscapeFilter : public ModRMFilter {
public: public:
/// Constructor /// Constructor
/// ///
/// @c0_ff - True if the ModR/M byte must fall between 0xc0 and 0xff; /// \param c0_ff True if the ModR/M byte must fall between 0xc0 and 0xff;
/// false otherwise. /// false otherwise.
/// @nnn_or_modRM - If c0_ff is true, the required value of the entire ModR/M ///
/// byte. If c0_ff is false, the required value of the nnn /// \param nnn_or_modRM If c0_ff is true, the required value of the entire
/// field. /// ModR/M byte. If c0_ff is false, the required value
/// of the nnn field.
EscapeFilter(bool c0_ff, uint8_t nnn_or_modRM) : EscapeFilter(bool c0_ff, uint8_t nnn_or_modRM) :
ModRMFilter(), ModRMFilter(),
C0_FF(c0_ff), C0_FF(c0_ff),
@ -128,8 +129,8 @@ class AddRegEscapeFilter : public ModRMFilter {
public: public:
/// Constructor /// Constructor
/// ///
/// @modRM - The value of the ModR/M byte when the register operand /// \param modRM The value of the ModR/M byte when the register operand
/// refers to the first register in the register set. /// refers to the first register in the register set.
AddRegEscapeFilter(uint8_t modRM) : ModRM(modRM) { AddRegEscapeFilter(uint8_t modRM) : ModRM(modRM) {
} }
@ -150,9 +151,9 @@ class ExtendedFilter : public ModRMFilter {
public: public:
/// Constructor /// Constructor
/// ///
/// @r - True if the mod field must be set to 11; false otherwise. /// \param r True if the mod field must be set to 11; false otherwise.
/// The name is explained at ModFilter. /// The name is explained at ModFilter.
/// @nnn - The required value of the nnn field. /// \param nnn The required value of the nnn field.
ExtendedFilter(bool r, uint8_t nnn) : ExtendedFilter(bool r, uint8_t nnn) :
ModRMFilter(), ModRMFilter(),
R(r), R(r),
@ -177,7 +178,7 @@ class ExactFilter : public ModRMFilter {
public: public:
/// Constructor /// Constructor
/// ///
/// @modRM - The required value of the full ModR/M byte. /// \param modRM The required value of the full ModR/M byte.
ExactFilter(uint8_t modRM) : ExactFilter(uint8_t modRM) :
ModRMFilter(), ModRMFilter(),
ModRM(modRM) { ModRM(modRM) {

View File

@ -225,23 +225,23 @@ private:
/// emitInstructionSpecifier - Loads the instruction specifier for the current /// emitInstructionSpecifier - Loads the instruction specifier for the current
/// instruction into a DisassemblerTables. /// instruction into a DisassemblerTables.
/// ///
/// @arg tables - The DisassemblerTables to populate with the specifier for /// \param tables The DisassemblerTables to populate with the specifier for
/// the current instruction. /// the current instruction.
void emitInstructionSpecifier(DisassemblerTables &tables); void emitInstructionSpecifier(DisassemblerTables &tables);
/// emitDecodePath - Populates the proper fields in the decode tables /// emitDecodePath - Populates the proper fields in the decode tables
/// corresponding to the decode paths for this instruction. /// corresponding to the decode paths for this instruction.
/// ///
/// @arg tables - The DisassemblerTables to populate with the decode /// \param tables The DisassemblerTables to populate with the decode
/// decode information for the current instruction. /// decode information for the current instruction.
void emitDecodePath(DisassemblerTables &tables) const; void emitDecodePath(DisassemblerTables &tables) const;
/// Constructor - Initializes a RecognizableInstr with the appropriate fields /// Constructor - Initializes a RecognizableInstr with the appropriate fields
/// from a CodeGenInstruction. /// from a CodeGenInstruction.
/// ///
/// @arg tables - The DisassemblerTables that the specifier will be added to. /// \param tables The DisassemblerTables that the specifier will be added to.
/// @arg insn - The CodeGenInstruction to extract information from. /// \param insn The CodeGenInstruction to extract information from.
/// @arg uid - The unique ID of the current instruction. /// \param uid The unique ID of the current instruction.
RecognizableInstr(DisassemblerTables &tables, RecognizableInstr(DisassemblerTables &tables,
const CodeGenInstruction &insn, const CodeGenInstruction &insn,
InstrUID uid); InstrUID uid);
@ -249,11 +249,11 @@ public:
/// processInstr - Accepts a CodeGenInstruction and loads decode information /// processInstr - Accepts a CodeGenInstruction and loads decode information
/// for it into a DisassemblerTables if appropriate. /// for it into a DisassemblerTables if appropriate.
/// ///
/// @arg tables - The DiassemblerTables to be populated with decode /// \param tables The DiassemblerTables to be populated with decode
/// information. /// information.
/// @arg insn - The CodeGenInstruction to be used as a source for this /// \param insn The CodeGenInstruction to be used as a source for this
/// information. /// information.
/// @uid - The unique ID of the instruction. /// \param uid The unique ID of the instruction.
static void processInstr(DisassemblerTables &tables, static void processInstr(DisassemblerTables &tables,
const CodeGenInstruction &insn, const CodeGenInstruction &insn,
InstrUID uid); InstrUID uid);