mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +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:
@@ -638,7 +638,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
|
||||
// something and {} into void.
|
||||
// Make the new struct packed if we used to return a packed struct
|
||||
// already.
|
||||
NRetTy = StructType::get(RetTypes, STy->isPacked());
|
||||
NRetTy = StructType::get(STy->getContext(), RetTypes, STy->isPacked());
|
||||
else if (RetTypes.size() == 1)
|
||||
// One return type? Just a simple value then, but only if we didn't use to
|
||||
// return a struct with that simple value before.
|
||||
|
@@ -1961,7 +1961,7 @@ static GlobalVariable *InstallGlobalCtors(GlobalVariable *GCL,
|
||||
CSVals[1] = Constant::getNullValue(PFTy);
|
||||
CSVals[0] = ConstantInt::get(Type::Int32Ty, 2147483647);
|
||||
}
|
||||
CAList.push_back(ConstantStruct::get(CSVals));
|
||||
CAList.push_back(ConstantStruct::get(Context, CSVals));
|
||||
}
|
||||
|
||||
// Create the array initializer.
|
||||
@@ -2069,7 +2069,7 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val,
|
||||
Elts[Idx] = EvaluateStoreInto(Elts[Idx], Val, Addr, OpNo+1, Context);
|
||||
|
||||
// Return the modified struct.
|
||||
return ConstantStruct::get(&Elts[0], Elts.size(), STy->isPacked());
|
||||
return ConstantStruct::get(Context, &Elts[0], Elts.size(), STy->isPacked());
|
||||
} else {
|
||||
ConstantInt *CI = cast<ConstantInt>(Addr->getOperand(OpNo));
|
||||
const ArrayType *ATy = cast<ArrayType>(Init->getType());
|
||||
|
Reference in New Issue
Block a user