remove function names from comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219803 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel 2014-10-15 16:20:45 +00:00
parent 03631a8ad5
commit ed0b7a0b1a

View File

@ -28,9 +28,8 @@ class GetElementPtrInst;
class BinaryOperator; class BinaryOperator;
class ConstantExpr; class ConstantExpr;
/// Operator - This is a utility class that provides an abstraction for the /// This is a utility class that provides an abstraction for the common
/// common functionality between Instructions and ConstantExprs. /// functionality between Instructions and ConstantExprs.
///
class Operator : public User { class Operator : public User {
private: private:
// The Operator class is intended to be used as a utility, and is never itself // The Operator class is intended to be used as a utility, and is never itself
@ -46,17 +45,15 @@ protected:
~Operator(); ~Operator();
public: public:
/// getOpcode - Return the opcode for this Instruction or ConstantExpr. /// Return the opcode for this Instruction or ConstantExpr.
///
unsigned getOpcode() const { unsigned getOpcode() const {
if (const Instruction *I = dyn_cast<Instruction>(this)) if (const Instruction *I = dyn_cast<Instruction>(this))
return I->getOpcode(); return I->getOpcode();
return cast<ConstantExpr>(this)->getOpcode(); return cast<ConstantExpr>(this)->getOpcode();
} }
/// getOpcode - If V is an Instruction or ConstantExpr, return its /// If V is an Instruction or ConstantExpr, return its opcode.
/// opcode. Otherwise return UserOp1. /// Otherwise return UserOp1.
///
static unsigned getOpcode(const Value *V) { static unsigned getOpcode(const Value *V) {
if (const Instruction *I = dyn_cast<Instruction>(V)) if (const Instruction *I = dyn_cast<Instruction>(V))
return I->getOpcode(); return I->getOpcode();
@ -72,10 +69,9 @@ public:
} }
}; };
/// OverflowingBinaryOperator - Utility class for integer arithmetic operators /// Utility class for integer arithmetic operators which may exhibit overflow -
/// which may exhibit overflow - Add, Sub, and Mul. It does not include SDiv, /// Add, Sub, and Mul. It does not include SDiv, despite that operator having
/// despite that operator having the potential for overflow. /// the potential for overflow.
///
class OverflowingBinaryOperator : public Operator { class OverflowingBinaryOperator : public Operator {
public: public:
enum { enum {
@ -96,13 +92,13 @@ private:
} }
public: public:
/// hasNoUnsignedWrap - Test whether this operation is known to never /// Test whether this operation is known to never
/// undergo unsigned overflow, aka the nuw property. /// undergo unsigned overflow, aka the nuw property.
bool hasNoUnsignedWrap() const { bool hasNoUnsignedWrap() const {
return SubclassOptionalData & NoUnsignedWrap; return SubclassOptionalData & NoUnsignedWrap;
} }
/// hasNoSignedWrap - Test whether this operation is known to never /// Test whether this operation is known to never
/// undergo signed overflow, aka the nsw property. /// undergo signed overflow, aka the nsw property.
bool hasNoSignedWrap() const { bool hasNoSignedWrap() const {
return (SubclassOptionalData & NoSignedWrap) != 0; return (SubclassOptionalData & NoSignedWrap) != 0;
@ -126,8 +122,8 @@ public:
} }
}; };
/// PossiblyExactOperator - A udiv or sdiv instruction, which can be marked as /// A udiv or sdiv instruction, which can be marked as "exact",
/// "exact", indicating that no bits are destroyed. /// indicating that no bits are destroyed.
class PossiblyExactOperator : public Operator { class PossiblyExactOperator : public Operator {
public: public:
enum { enum {
@ -142,8 +138,7 @@ private:
} }
public: public:
/// isExact - Test whether this division is known to be exact, with /// Test whether this division is known to be exact, with zero remainder.
/// zero remainder.
bool isExact() const { bool isExact() const {
return SubclassOptionalData & IsExact; return SubclassOptionalData & IsExact;
} }
@ -217,7 +212,7 @@ public:
}; };
/// FPMathOperator - Utility class for floating point operations which can have /// Utility class for floating point operations which can have
/// information about relaxed accuracy requirements attached to them. /// information about relaxed accuracy requirements attached to them.
class FPMathOperator : public Operator { class FPMathOperator : public Operator {
private: private:
@ -319,8 +314,7 @@ public:
}; };
/// ConcreteOperator - A helper template for defining operators for individual /// A helper template for defining operators for individual opcodes.
/// opcodes.
template<typename SuperClass, unsigned Opc> template<typename SuperClass, unsigned Opc>
class ConcreteOperator : public SuperClass { class ConcreteOperator : public SuperClass {
public: public:
@ -379,8 +373,7 @@ class GEPOperator
} }
public: public:
/// isInBounds - Test whether this is an inbounds GEP, as defined /// Test whether this is an inbounds GEP, as defined by LangRef.html.
/// by LangRef.html.
bool isInBounds() const { bool isInBounds() const {
return SubclassOptionalData & IsInBounds; return SubclassOptionalData & IsInBounds;
} }
@ -400,14 +393,12 @@ public:
return 0U; // get index for modifying correct operand return 0U; // get index for modifying correct operand
} }
/// getPointerOperandType - Method to return the pointer operand as a /// Method to return the pointer operand as a PointerType.
/// PointerType.
Type *getPointerOperandType() const { Type *getPointerOperandType() const {
return getPointerOperand()->getType(); return getPointerOperand()->getType();
} }
/// getPointerAddressSpace - Method to return the address space of the /// Method to return the address space of the pointer operand.
/// pointer operand.
unsigned getPointerAddressSpace() const { unsigned getPointerAddressSpace() const {
return getPointerOperandType()->getPointerAddressSpace(); return getPointerOperandType()->getPointerAddressSpace();
} }
@ -420,8 +411,8 @@ public:
return getNumOperands() > 1; return getNumOperands() > 1;
} }
/// hasAllZeroIndices - Return true if all of the indices of this GEP are /// Return true if all of the indices of this GEP are zeros.
/// zeros. If so, the result pointer and the first operand have the same /// If so, the result pointer and the first operand have the same
/// value, just potentially different types. /// value, just potentially different types.
bool hasAllZeroIndices() const { bool hasAllZeroIndices() const {
for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) { for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) {
@ -433,8 +424,8 @@ public:
return true; return true;
} }
/// hasAllConstantIndices - Return true if all of the indices of this GEP are /// Return true if all of the indices of this GEP are constant integers.
/// constant integers. If so, the result pointer and the first operand have /// If so, the result pointer and the first operand have
/// a constant offset between them. /// a constant offset between them.
bool hasAllConstantIndices() const { bool hasAllConstantIndices() const {
for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) { for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) {
@ -500,14 +491,12 @@ public:
return 0U; // get index for modifying correct operand return 0U; // get index for modifying correct operand
} }
/// getPointerOperandType - Method to return the pointer operand as a /// Method to return the pointer operand as a PointerType.
/// PointerType.
Type *getPointerOperandType() const { Type *getPointerOperandType() const {
return getPointerOperand()->getType(); return getPointerOperand()->getType();
} }
/// getPointerAddressSpace - Method to return the address space of the /// Method to return the address space of the pointer operand.
/// pointer operand.
unsigned getPointerAddressSpace() const { unsigned getPointerAddressSpace() const {
return cast<PointerType>(getPointerOperandType())->getAddressSpace(); return cast<PointerType>(getPointerOperandType())->getAddressSpace();
} }