mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -390,8 +390,8 @@ GenericValue JIT::runFunction(Function *F,
|
||||
|
||||
void *FPtr = getPointerToFunction(F);
|
||||
assert(FPtr && "Pointer to fn's code was null after getPointerToFunction");
|
||||
const FunctionType *FTy = F->getFunctionType();
|
||||
const Type *RetTy = FTy->getReturnType();
|
||||
FunctionType *FTy = F->getFunctionType();
|
||||
Type *RetTy = FTy->getReturnType();
|
||||
|
||||
assert((FTy->getNumParams() == ArgValues.size() ||
|
||||
(FTy->isVarArg() && FTy->getNumParams() <= ArgValues.size())) &&
|
||||
@@ -500,7 +500,7 @@ GenericValue JIT::runFunction(Function *F,
|
||||
SmallVector<Value*, 8> Args;
|
||||
for (unsigned i = 0, e = ArgValues.size(); i != e; ++i) {
|
||||
Constant *C = 0;
|
||||
const Type *ArgTy = FTy->getParamType(i);
|
||||
Type *ArgTy = FTy->getParamType(i);
|
||||
const GenericValue &AV = ArgValues[i];
|
||||
switch (ArgTy->getTypeID()) {
|
||||
default: llvm_unreachable("Unknown argument type for function call!");
|
||||
@@ -788,7 +788,7 @@ char* JIT::getMemoryForGV(const GlobalVariable* GV) {
|
||||
// be allocated into the same buffer, but in general globals are allocated
|
||||
// through the memory manager which puts them near the code but not in the
|
||||
// same buffer.
|
||||
const Type *GlobalType = GV->getType()->getElementType();
|
||||
Type *GlobalType = GV->getType()->getElementType();
|
||||
size_t S = getTargetData()->getTypeAllocSize(GlobalType);
|
||||
size_t A = getTargetData()->getPreferredAlignment(GV);
|
||||
if (GV->isThreadLocal()) {
|
||||
|
Reference in New Issue
Block a user