mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -554,7 +554,6 @@ Constant *ConstantInt::getFalse(Type *Ty) {
|
|||||||
ConstantInt::getFalse(Ty->getContext()));
|
ConstantInt::getFalse(Ty->getContext()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get a ConstantInt from an APInt. Note that the value stored in the DenseMap
|
// Get a ConstantInt from an APInt. Note that the value stored in the DenseMap
|
||||||
// as the key, is a DenseMapAPIntKeyInfo::KeyTy which has provided the
|
// as the key, is a DenseMapAPIntKeyInfo::KeyTy which has provided the
|
||||||
// operator== and operator!= to ensure that the DenseMap doesn't attempt to
|
// operator== and operator!= to ensure that the DenseMap doesn't attempt to
|
||||||
@ -566,7 +565,8 @@ ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
|
|||||||
// get an existing value or the insertion position
|
// get an existing value or the insertion position
|
||||||
LLVMContextImpl *pImpl = Context.pImpl;
|
LLVMContextImpl *pImpl = Context.pImpl;
|
||||||
ConstantInt *&Slot = pImpl->IntConstants[DenseMapAPIntKeyInfo::KeyTy(V, ITy)];
|
ConstantInt *&Slot = pImpl->IntConstants[DenseMapAPIntKeyInfo::KeyTy(V, ITy)];
|
||||||
if (!Slot) Slot = new ConstantInt(ITy, V);
|
if (!Slot)
|
||||||
|
Slot = new ConstantInt(ITy, V);
|
||||||
return Slot;
|
return Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,7 @@ struct DenseMapAPIntKeyInfo {
|
|||||||
bool operator==(const KeyTy &that) const {
|
bool operator==(const KeyTy &that) const {
|
||||||
return type == that.type && this->val == that.val;
|
return type == that.type && this->val == that.val;
|
||||||
}
|
}
|
||||||
bool operator!=(const KeyTy& that) const {
|
bool operator!=(const KeyTy &that) const { return !this->operator==(that); }
|
||||||
return !this->operator==(that);
|
|
||||||
}
|
|
||||||
friend hash_code hash_value(const KeyTy &Key) {
|
friend hash_code hash_value(const KeyTy &Key) {
|
||||||
return hash_combine(Key.type, Key.val);
|
return hash_combine(Key.type, Key.val);
|
||||||
}
|
}
|
||||||
@ -65,9 +63,7 @@ struct DenseMapAPIntKeyInfo {
|
|||||||
static unsigned getHashValue(const KeyTy &Key) {
|
static unsigned getHashValue(const KeyTy &Key) {
|
||||||
return static_cast<unsigned>(hash_value(Key));
|
return static_cast<unsigned>(hash_value(Key));
|
||||||
}
|
}
|
||||||
static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) {
|
static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) { return LHS == RHS; }
|
||||||
return LHS == RHS;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DenseMapAPFloatKeyInfo {
|
struct DenseMapAPFloatKeyInfo {
|
||||||
@ -77,9 +73,7 @@ struct DenseMapAPFloatKeyInfo {
|
|||||||
bool operator==(const KeyTy &that) const {
|
bool operator==(const KeyTy &that) const {
|
||||||
return this->val.bitwiseIsEqual(that.val);
|
return this->val.bitwiseIsEqual(that.val);
|
||||||
}
|
}
|
||||||
bool operator!=(const KeyTy& that) const {
|
bool operator!=(const KeyTy &that) const { return !this->operator==(that); }
|
||||||
return !this->operator==(that);
|
|
||||||
}
|
|
||||||
friend hash_code hash_value(const KeyTy &Key) {
|
friend hash_code hash_value(const KeyTy &Key) {
|
||||||
return hash_combine(Key.val);
|
return hash_combine(Key.val);
|
||||||
}
|
}
|
||||||
@ -93,9 +87,7 @@ struct DenseMapAPFloatKeyInfo {
|
|||||||
static unsigned getHashValue(const KeyTy &Key) {
|
static unsigned getHashValue(const KeyTy &Key) {
|
||||||
return static_cast<unsigned>(hash_value(Key));
|
return static_cast<unsigned>(hash_value(Key));
|
||||||
}
|
}
|
||||||
static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) {
|
static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) { return LHS == RHS; }
|
||||||
return LHS == RHS;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AnonStructTypeKeyInfo {
|
struct AnonStructTypeKeyInfo {
|
||||||
|
Reference in New Issue
Block a user