mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding.
This commit is contained in:
@@ -36,7 +36,7 @@ static LLValue* to_pkey(Loc& loc, DValue* key)
|
||||
pkey = key->getRVal();
|
||||
}
|
||||
else {
|
||||
LLValue* tmp = new llvm::AllocaInst(DtoType(keytype), "aatmpkeystorage", gIR->topallocapoint());
|
||||
LLValue* tmp = DtoAlloca(DtoType(keytype), "aatmpkeystorage");
|
||||
DVarValue* var = new DVarValue(keytype, tmp, true);
|
||||
DtoAssign(loc, var, key);
|
||||
return tmp;
|
||||
@@ -44,7 +44,7 @@ static LLValue* to_pkey(Loc& loc, DValue* key)
|
||||
|
||||
// give memory
|
||||
if (needmem) {
|
||||
LLValue* tmp = new llvm::AllocaInst(DtoType(keytype), "aatmpkeystorage", gIR->topallocapoint());
|
||||
LLValue* tmp = DtoAlloca(DtoType(keytype), "aatmpkeystorage");
|
||||
DtoStore(pkey, tmp);
|
||||
pkey = tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user