mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-28 09:31:03 +00:00
Do not pass a null pointer if this instruction is not prepended or
appended anywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f6e8cb4954
commit
fe3a093bc6
@ -394,7 +394,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
|
|||||||
Indices.push_back(ConstantUInt::get(Type::UIntTy, i));
|
Indices.push_back(ConstantUInt::get(Type::UIntTy, i));
|
||||||
GetElementPtrInst *GEP =
|
GetElementPtrInst *GEP =
|
||||||
new GetElementPtrInst(Struct, Indices,
|
new GetElementPtrInst(Struct, Indices,
|
||||||
"gep_" + StructValues[i]->getName(), 0);
|
"gep_" + StructValues[i]->getName());
|
||||||
codeReplacer->getInstList().push_back(GEP);
|
codeReplacer->getInstList().push_back(GEP);
|
||||||
StoreInst *SI = new StoreInst(StructValues[i], GEP);
|
StoreInst *SI = new StoreInst(StructValues[i], GEP);
|
||||||
codeReplacer->getInstList().push_back(SI);
|
codeReplacer->getInstList().push_back(SI);
|
||||||
@ -420,7 +420,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
|
|||||||
Indices.push_back(ConstantUInt::get(Type::UIntTy, FirstOut + i));
|
Indices.push_back(ConstantUInt::get(Type::UIntTy, FirstOut + i));
|
||||||
GetElementPtrInst *GEP
|
GetElementPtrInst *GEP
|
||||||
= new GetElementPtrInst(Struct, Indices,
|
= new GetElementPtrInst(Struct, Indices,
|
||||||
"gep_reload_" + outputs[i]->getName(), 0);
|
"gep_reload_" + outputs[i]->getName());
|
||||||
codeReplacer->getInstList().push_back(GEP);
|
codeReplacer->getInstList().push_back(GEP);
|
||||||
Output = GEP;
|
Output = GEP;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user