mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-20 12:31:40 +00:00
Move object construction into [] so the temporary can be moved.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da8b91a073
commit
6dd56e60b0
@ -483,8 +483,8 @@ ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
|
||||
// Get the corresponding integer type for the bit width of the value.
|
||||
IntegerType *ITy = IntegerType::get(Context, V.getBitWidth());
|
||||
// get an existing value or the insertion position
|
||||
DenseMapAPIntKeyInfo::KeyTy Key(V, ITy);
|
||||
ConstantInt *&Slot = Context.pImpl->IntConstants[Key];
|
||||
LLVMContextImpl *pImpl = Context.pImpl;
|
||||
ConstantInt *&Slot = pImpl->IntConstants[DenseMapAPIntKeyInfo::KeyTy(V, ITy)];
|
||||
if (!Slot) Slot = new ConstantInt(ITy, V);
|
||||
return Slot;
|
||||
}
|
||||
@ -608,11 +608,9 @@ Constant *ConstantFP::getZeroValueForNegation(Type *Ty) {
|
||||
|
||||
// ConstantFP accessors.
|
||||
ConstantFP* ConstantFP::get(LLVMContext &Context, const APFloat& V) {
|
||||
DenseMapAPFloatKeyInfo::KeyTy Key(V);
|
||||
|
||||
LLVMContextImpl* pImpl = Context.pImpl;
|
||||
|
||||
ConstantFP *&Slot = pImpl->FPConstants[Key];
|
||||
ConstantFP *&Slot = pImpl->FPConstants[DenseMapAPFloatKeyInfo::KeyTy(V)];
|
||||
|
||||
if (!Slot) {
|
||||
Type *Ty;
|
||||
|
Loading…
x
Reference in New Issue
Block a user