Update clang to r339409.
Change-Id: I800772d2d838223be1f6b40d490c4591b937fca2
diff --git a/linux-x64/clang/include/llvm/IR/Value.h b/linux-x64/clang/include/llvm/IR/Value.h
index d848fe9..4f3a45c 100644
--- a/linux-x64/clang/include/llvm/IR/Value.h
+++ b/linux-x64/clang/include/llvm/IR/Value.h
@@ -57,7 +57,7 @@
// Value Class
//===----------------------------------------------------------------------===//
-/// \brief LLVM Value Representation
+/// LLVM Value Representation
///
/// This is a very important LLVM class. It is the base class of all values
/// computed by a program that may be used as operands to other values. Value is
@@ -83,7 +83,7 @@
unsigned char HasValueHandle : 1; // Has a ValueHandle pointing to this?
protected:
- /// \brief Hold subclass data that can be dropped.
+ /// Hold subclass data that can be dropped.
///
/// This member is similar to SubclassData, however it is for holding
/// information which may be used to aid optimization, but which may be
@@ -91,7 +91,7 @@
unsigned char SubclassOptionalData : 7;
private:
- /// \brief Hold arbitrary subclass data.
+ /// Hold arbitrary subclass data.
///
/// This member is defined by this class, but is not used for anything.
/// Subclasses can use it to hold whatever state they find useful. This
@@ -99,7 +99,7 @@
unsigned short SubclassData;
protected:
- /// \brief The number of operands in the subclass.
+ /// The number of operands in the subclass.
///
/// This member is defined by this class, but not used for anything.
/// Subclasses can use it to store their number of operands, if they have
@@ -173,7 +173,7 @@
bool operator==(const user_iterator_impl &x) const { return UI == x.UI; }
bool operator!=(const user_iterator_impl &x) const { return !operator==(x); }
- /// \brief Returns true if this iterator is equal to user_end() on the value.
+ /// Returns true if this iterator is equal to user_end() on the value.
bool atEnd() const { return *this == user_iterator_impl(); }
user_iterator_impl &operator++() { // Preincrement
@@ -218,17 +218,17 @@
/// Delete a pointer to a generic Value.
void deleteValue();
- /// \brief Support for debugging, callable in GDB: V->dump()
+ /// Support for debugging, callable in GDB: V->dump()
void dump() const;
- /// \brief Implement operator<< on Value.
+ /// Implement operator<< on Value.
/// @{
void print(raw_ostream &O, bool IsForDebug = false) const;
void print(raw_ostream &O, ModuleSlotTracker &MST,
bool IsForDebug = false) const;
/// @}
- /// \brief Print the name of this Value out to the specified raw_ostream.
+ /// Print the name of this Value out to the specified raw_ostream.
///
/// This is useful when you just want to print 'int %reg126', not the
/// instruction that generated it. If you specify a Module for context, then
@@ -241,52 +241,53 @@
ModuleSlotTracker &MST) const;
/// @}
- /// \brief All values are typed, get the type of this value.
+ /// All values are typed, get the type of this value.
Type *getType() const { return VTy; }
- /// \brief All values hold a context through their type.
+ /// All values hold a context through their type.
LLVMContext &getContext() const;
- // \brief All values can potentially be named.
+ // All values can potentially be named.
bool hasName() const { return HasName; }
ValueName *getValueName() const;
void setValueName(ValueName *VN);
private:
void destroyValueName();
- void doRAUW(Value *New, bool NoMetadata);
+ enum class ReplaceMetadataUses { No, Yes };
+ void doRAUW(Value *New, ReplaceMetadataUses);
void setNameImpl(const Twine &Name);
public:
- /// \brief Return a constant reference to the value's name.
+ /// Return a constant reference to the value's name.
///
/// This guaranteed to return the same reference as long as the value is not
/// modified. If the value has a name, this does a hashtable lookup, so it's
/// not free.
StringRef getName() const;
- /// \brief Change the name of the value.
+ /// Change the name of the value.
///
/// Choose a new unique name if the provided name is taken.
///
/// \param Name The new name; or "" if the value's name should be removed.
void setName(const Twine &Name);
- /// \brief Transfer the name from V to this value.
+ /// Transfer the name from V to this value.
///
/// After taking V's name, sets V's name to empty.
///
/// \note It is an error to call V->takeName(V).
void takeName(Value *V);
- /// \brief Change all uses of this to point to a new Value.
+ /// Change all uses of this to point to a new Value.
///
/// Go through the uses list for this definition and make each use point to
/// "V" instead of "this". After this completes, 'this's use list is
/// guaranteed to be empty.
void replaceAllUsesWith(Value *V);
- /// \brief Change non-metadata uses of this to point to a new Value.
+ /// Change non-metadata uses of this to point to a new Value.
///
/// Go through the uses list for this definition and make each use point to
/// "V" instead of "this". This function skips metadata entries in the list.
@@ -299,12 +300,6 @@
/// values or constant users.
void replaceUsesOutsideBlock(Value *V, BasicBlock *BB);
- /// replaceUsesExceptBlockAddr - Go through the uses list for this definition
- /// and make each use point to "V" instead of "this" when the use is outside
- /// the block. 'This's use list is expected to have at least one element.
- /// Unlike replaceAllUsesWith this function skips blockaddr uses.
- void replaceUsesExceptBlockAddr(Value *New);
-
//----------------------------------------------------------------------
// Methods for handling the chain of uses of this Value.
//
@@ -411,7 +406,7 @@
return materialized_users();
}
- /// \brief Return true if there is exactly one user of this value.
+ /// Return true if there is exactly one user of this value.
///
/// This is specialized because it is a common request and does not require
/// traversing the whole use list.
@@ -421,27 +416,27 @@
return ++I == E;
}
- /// \brief Return true if this Value has exactly N users.
+ /// Return true if this Value has exactly N users.
bool hasNUses(unsigned N) const;
- /// \brief Return true if this value has N users or more.
+ /// Return true if this value has N users or more.
///
/// This is logically equivalent to getNumUses() >= N.
bool hasNUsesOrMore(unsigned N) const;
- /// \brief Check if this value is used in the specified basic block.
+ /// Check if this value is used in the specified basic block.
bool isUsedInBasicBlock(const BasicBlock *BB) const;
- /// \brief This method computes the number of uses of this Value.
+ /// This method computes the number of uses of this Value.
///
/// This is a linear time operation. Use hasOneUse, hasNUses, or
/// hasNUsesOrMore to check for specific values.
unsigned getNumUses() const;
- /// \brief This method should only be used by the Use class.
+ /// This method should only be used by the Use class.
void addUse(Use &U) { U.addToList(&UseList); }
- /// \brief Concrete subclass of this.
+ /// Concrete subclass of this.
///
/// An enumeration for keeping track of the concrete subclass of Value that
/// is actually instantiated. Values of this enumeration are kept in the
@@ -456,7 +451,7 @@
#include "llvm/IR/Value.def"
};
- /// \brief Return an ID for the concrete type of this object.
+ /// Return an ID for the concrete type of this object.
///
/// This is used to implement the classof checks. This should not be used
/// for any other purpose, as the values may change as LLVM evolves. Also,
@@ -470,36 +465,36 @@
return SubclassID;
}
- /// \brief Return the raw optional flags value contained in this value.
+ /// Return the raw optional flags value contained in this value.
///
/// This should only be used when testing two Values for equivalence.
unsigned getRawSubclassOptionalData() const {
return SubclassOptionalData;
}
- /// \brief Clear the optional flags contained in this value.
+ /// Clear the optional flags contained in this value.
void clearSubclassOptionalData() {
SubclassOptionalData = 0;
}
- /// \brief Check the optional flags for equality.
+ /// Check the optional flags for equality.
bool hasSameSubclassOptionalData(const Value *V) const {
return SubclassOptionalData == V->SubclassOptionalData;
}
- /// \brief Return true if there is a value handle associated with this value.
+ /// Return true if there is a value handle associated with this value.
bool hasValueHandle() const { return HasValueHandle; }
- /// \brief Return true if there is metadata referencing this value.
+ /// Return true if there is metadata referencing this value.
bool isUsedByMetadata() const { return IsUsedByMD; }
- /// \brief Return true if this value is a swifterror value.
+ /// Return true if this value is a swifterror value.
///
/// swifterror values can be either a function argument or an alloca with a
/// swifterror attribute.
bool isSwiftError() const;
- /// \brief Strip off pointer casts, all-zero GEPs, and aliases.
+ /// Strip off pointer casts, all-zero GEPs, and aliases.
///
/// Returns the original uncasted value. If this is called on a non-pointer
/// value, it returns 'this'.
@@ -509,18 +504,19 @@
static_cast<const Value *>(this)->stripPointerCasts());
}
- /// \brief Strip off pointer casts, all-zero GEPs, aliases and barriers.
+ /// Strip off pointer casts, all-zero GEPs, aliases and invariant group
+ /// info.
///
/// Returns the original uncasted value. If this is called on a non-pointer
/// value, it returns 'this'. This function should be used only in
/// Alias analysis.
- const Value *stripPointerCastsAndBarriers() const;
- Value *stripPointerCastsAndBarriers() {
+ const Value *stripPointerCastsAndInvariantGroups() const;
+ Value *stripPointerCastsAndInvariantGroups() {
return const_cast<Value *>(
- static_cast<const Value *>(this)->stripPointerCastsAndBarriers());
+ static_cast<const Value *>(this)->stripPointerCastsAndInvariantGroups());
}
- /// \brief Strip off pointer casts and all-zero GEPs.
+ /// Strip off pointer casts and all-zero GEPs.
///
/// Returns the original uncasted value. If this is called on a non-pointer
/// value, it returns 'this'.
@@ -530,7 +526,7 @@
static_cast<const Value *>(this)->stripPointerCastsNoFollowAliases());
}
- /// \brief Strip off pointer casts and all-constant inbounds GEPs.
+ /// Strip off pointer casts and all-constant inbounds GEPs.
///
/// Returns the original pointer value. If this is called on a non-pointer
/// value, it returns 'this'.
@@ -540,7 +536,7 @@
static_cast<const Value *>(this)->stripInBoundsConstantOffsets());
}
- /// \brief Accumulate offsets from \a stripInBoundsConstantOffsets().
+ /// Accumulate offsets from \a stripInBoundsConstantOffsets().
///
/// Stores the resulting constant offset stripped into the APInt provided.
/// The provided APInt will be extended or truncated as needed to be the
@@ -555,7 +551,7 @@
->stripAndAccumulateInBoundsConstantOffsets(DL, Offset));
}
- /// \brief Strip off pointer casts and inbounds GEPs.
+ /// Strip off pointer casts and inbounds GEPs.
///
/// Returns the original pointer value. If this is called on a non-pointer
/// value, it returns 'this'.
@@ -565,7 +561,7 @@
static_cast<const Value *>(this)->stripInBoundsOffsets());
}
- /// \brief Returns the number of bytes known to be dereferenceable for the
+ /// Returns the number of bytes known to be dereferenceable for the
/// pointer value.
///
/// If CanBeNull is set by this function the pointer can either be null or be
@@ -573,13 +569,13 @@
uint64_t getPointerDereferenceableBytes(const DataLayout &DL,
bool &CanBeNull) const;
- /// \brief Returns an alignment of the pointer value.
+ /// Returns an alignment of the pointer value.
///
/// Returns an alignment which is either specified explicitly, e.g. via
/// align attribute of a function argument, or guaranteed by DataLayout.
unsigned getPointerAlignment(const DataLayout &DL) const;
- /// \brief Translate PHI node to its predecessor from the given basic block.
+ /// Translate PHI node to its predecessor from the given basic block.
///
/// If this value is a PHI node with CurBB as its parent, return the value in
/// the PHI node corresponding to PredBB. If not, return ourself. This is
@@ -592,14 +588,14 @@
static_cast<const Value *>(this)->DoPHITranslation(CurBB, PredBB));
}
- /// \brief The maximum alignment for instructions.
+ /// The maximum alignment for instructions.
///
/// This is the greatest alignment value supported by load, store, and alloca
/// instructions, and global values.
static const unsigned MaxAlignmentExponent = 29;
static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent;
- /// \brief Mutate the type of this Value to be of the specified type.
+ /// Mutate the type of this Value to be of the specified type.
///
/// Note that this is an extremely dangerous operation which can create
/// completely invalid IR very easily. It is strongly recommended that you
@@ -609,17 +605,17 @@
VTy = Ty;
}
- /// \brief Sort the use-list.
+ /// Sort the use-list.
///
/// Sorts the Value's use-list by Cmp using a stable mergesort. Cmp is
/// expected to compare two \a Use references.
template <class Compare> void sortUseList(Compare Cmp);
- /// \brief Reverse the use-list.
+ /// Reverse the use-list.
void reverseUseList();
private:
- /// \brief Merge two lists together.
+ /// Merge two lists together.
///
/// Merges \c L and \c R using \c Cmp. To enable stable sorts, always pushes
/// "equal" items from L before items from R.