mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -275,7 +275,7 @@ Function *CodeExtractor::constructFunction(const Values &inputs,
|
||||
|
||||
if (AggregateArgs && (inputs.size() + outputs.size() > 0)) {
|
||||
PointerType *StructPtr =
|
||||
PointerType::getUnqual(StructType::get(paramTy));
|
||||
PointerType::getUnqual(StructType::get(M->getContext(), paramTy));
|
||||
paramTy.clear();
|
||||
paramTy.push_back(StructPtr);
|
||||
}
|
||||
@ -382,7 +382,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
|
||||
ArgTypes.push_back((*v)->getType());
|
||||
|
||||
// Allocate a struct at the beginning of this function
|
||||
Type *StructArgTy = StructType::get(ArgTypes);
|
||||
Type *StructArgTy = StructType::get(newFunction->getContext(), ArgTypes);
|
||||
Struct =
|
||||
new AllocaInst(StructArgTy, 0, "structArg",
|
||||
codeReplacer->getParent()->begin()->begin());
|
||||
|
Reference in New Issue
Block a user