mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
Remove trailing white space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// This file declares the Value class.
|
// This file declares the Value class.
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ typedef StringMapEntry<Value*> ValueName;
|
|||||||
// Value Class
|
// Value Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
/// This is a very important LLVM class. It is the base class of all values
|
/// 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
|
/// computed by a program that may be used as operands to other values. Value is
|
||||||
/// the super class of other important classes such as Instruction and Function.
|
/// the super class of other important classes such as Instruction and Function.
|
||||||
/// All Values have a Type. Type is not a subclass of Value. Some values can
|
/// All Values have a Type. Type is not a subclass of Value. Some values can
|
||||||
@@ -213,7 +213,7 @@ public:
|
|||||||
bool hasName() const { return Name != nullptr && SubclassID != MDStringVal; }
|
bool hasName() const { return Name != nullptr && SubclassID != MDStringVal; }
|
||||||
ValueName *getValueName() const { return Name; }
|
ValueName *getValueName() const { return Name; }
|
||||||
void setValueName(ValueName *VN) { Name = VN; }
|
void setValueName(ValueName *VN) { Name = VN; }
|
||||||
|
|
||||||
/// getName() - Return a constant reference to the value's name. This is cheap
|
/// getName() - Return a constant reference to the value's name. This is cheap
|
||||||
/// and guaranteed to return the same reference as long as the value is not
|
/// and guaranteed to return the same reference as long as the value is not
|
||||||
/// modified.
|
/// modified.
|
||||||
@@ -225,9 +225,9 @@ public:
|
|||||||
/// \param 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);
|
||||||
|
|
||||||
|
|
||||||
/// takeName - transfer the name from V to this value, setting V's name to
|
/// takeName - transfer the name from V to this value, setting V's name to
|
||||||
/// empty. It is an error to call V->takeName(V).
|
/// empty. It is an error to call V->takeName(V).
|
||||||
void takeName(Value *V);
|
void takeName(Value *V);
|
||||||
|
|
||||||
/// replaceAllUsesWith - Go through the uses list for this definition and make
|
/// replaceAllUsesWith - Go through the uses list for this definition and make
|
||||||
@@ -300,7 +300,7 @@ public:
|
|||||||
void addUse(Use &U) { U.addToList(&UseList); }
|
void addUse(Use &U) { U.addToList(&UseList); }
|
||||||
|
|
||||||
/// An enumeration for keeping track of the concrete subclass of Value that
|
/// An enumeration for keeping track of the concrete subclass of Value that
|
||||||
/// is actually instantiated. Values of this enumeration are kept in the
|
/// is actually instantiated. Values of this enumeration are kept in the
|
||||||
/// Value classes SubclassID field. They are used for concrete type
|
/// Value classes SubclassID field. They are used for concrete type
|
||||||
/// identification.
|
/// identification.
|
||||||
enum ValueTy {
|
enum ValueTy {
|
||||||
@@ -430,7 +430,7 @@ public:
|
|||||||
/// isDereferenceablePointer - Test if this value is always a pointer to
|
/// isDereferenceablePointer - Test if this value is always a pointer to
|
||||||
/// allocated and suitably aligned memory for a simple load or store.
|
/// allocated and suitably aligned memory for a simple load or store.
|
||||||
bool isDereferenceablePointer() const;
|
bool isDereferenceablePointer() const;
|
||||||
|
|
||||||
/// DoPHITranslation - If this value is a PHI node with CurBB as its parent,
|
/// DoPHITranslation - 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
|
/// return the value in the PHI node corresponding to PredBB. If not, return
|
||||||
/// ourself. This is useful if you want to know the value something has in a
|
/// ourself. This is useful if you want to know the value something has in a
|
||||||
@@ -441,11 +441,11 @@ public:
|
|||||||
const BasicBlock *PredBB) const{
|
const BasicBlock *PredBB) const{
|
||||||
return const_cast<Value*>(this)->DoPHITranslation(CurBB, PredBB);
|
return const_cast<Value*>(this)->DoPHITranslation(CurBB, PredBB);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// MaximumAlignment - This is the greatest alignment value supported by
|
/// MaximumAlignment - This is the greatest alignment value supported by
|
||||||
/// load, store, and alloca instructions, and global values.
|
/// load, store, and alloca instructions, and global values.
|
||||||
static const unsigned MaximumAlignment = 1u << 29;
|
static const unsigned MaximumAlignment = 1u << 29;
|
||||||
|
|
||||||
/// mutateType - Mutate the type of this Value to be of the specified type.
|
/// mutateType - Mutate the type of this Value to be of the specified type.
|
||||||
/// Note that this is an extremely dangerous operation which can create
|
/// Note that this is an extremely dangerous operation which can create
|
||||||
/// completely invalid IR very easily. It is strongly recommended that you
|
/// completely invalid IR very easily. It is strongly recommended that you
|
||||||
@@ -454,7 +454,7 @@ public:
|
|||||||
void mutateType(Type *Ty) {
|
void mutateType(Type *Ty) {
|
||||||
VTy = Ty;
|
VTy = Ty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
unsigned short getSubclassDataFromValue() const { return SubclassData; }
|
unsigned short getSubclassDataFromValue() const { return SubclassData; }
|
||||||
void setValueSubclassData(unsigned short D) { SubclassData = D; }
|
void setValueSubclassData(unsigned short D) { SubclassData = D; }
|
||||||
@@ -464,7 +464,7 @@ inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) {
|
|||||||
V.print(OS);
|
V.print(OS);
|
||||||
return OS;
|
return OS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Use::set(Value *V) {
|
void Use::set(Value *V) {
|
||||||
if (Val) removeFromList();
|
if (Val) removeFromList();
|
||||||
Val = V;
|
Val = V;
|
||||||
@@ -488,55 +488,55 @@ template <> struct isa_impl<Argument, Value> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<InlineAsm, Value> {
|
template <> struct isa_impl<InlineAsm, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() == Value::InlineAsmVal;
|
return Val.getValueID() == Value::InlineAsmVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<Instruction, Value> {
|
template <> struct isa_impl<Instruction, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() >= Value::InstructionVal;
|
return Val.getValueID() >= Value::InstructionVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<BasicBlock, Value> {
|
template <> struct isa_impl<BasicBlock, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() == Value::BasicBlockVal;
|
return Val.getValueID() == Value::BasicBlockVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<Function, Value> {
|
template <> struct isa_impl<Function, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() == Value::FunctionVal;
|
return Val.getValueID() == Value::FunctionVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<GlobalVariable, Value> {
|
template <> struct isa_impl<GlobalVariable, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() == Value::GlobalVariableVal;
|
return Val.getValueID() == Value::GlobalVariableVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<GlobalAlias, Value> {
|
template <> struct isa_impl<GlobalAlias, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() == Value::GlobalAliasVal;
|
return Val.getValueID() == Value::GlobalAliasVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<GlobalValue, Value> {
|
template <> struct isa_impl<GlobalValue, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return isa<GlobalVariable>(Val) || isa<Function>(Val) ||
|
return isa<GlobalVariable>(Val) || isa<Function>(Val) ||
|
||||||
isa<GlobalAlias>(Val);
|
isa<GlobalAlias>(Val);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct isa_impl<MDNode, Value> {
|
template <> struct isa_impl<MDNode, Value> {
|
||||||
static inline bool doit(const Value &Val) {
|
static inline bool doit(const Value &Val) {
|
||||||
return Val.getValueID() == Value::MDNodeVal;
|
return Val.getValueID() == Value::MDNodeVal;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Value* is only 4-byte aligned.
|
// Value* is only 4-byte aligned.
|
||||||
template<>
|
template<>
|
||||||
class PointerLikeTypeTraits<Value*> {
|
class PointerLikeTypeTraits<Value*> {
|
||||||
@@ -553,7 +553,7 @@ public:
|
|||||||
DEFINE_ISA_CONVERSION_FUNCTIONS(Value, LLVMValueRef)
|
DEFINE_ISA_CONVERSION_FUNCTIONS(Value, LLVMValueRef)
|
||||||
|
|
||||||
/* Specialized opaque value conversions.
|
/* Specialized opaque value conversions.
|
||||||
*/
|
*/
|
||||||
inline Value **unwrap(LLVMValueRef *Vals) {
|
inline Value **unwrap(LLVMValueRef *Vals) {
|
||||||
return reinterpret_cast<Value**>(Vals);
|
return reinterpret_cast<Value**>(Vals);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user