mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Get rid of obsolete TargetABI::newFunctionType() and doneWithFunctionType().
This commit is contained in:
parent
a00c2b5732
commit
f5592048e5
5 changed files with 0 additions and 23 deletions
|
@ -44,10 +44,6 @@ struct PPC64TargetABI : TargetABI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void newFunctionType(TypeFunction* tf)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool returnInArg(TypeFunction* tf)
|
bool returnInArg(TypeFunction* tf)
|
||||||
{
|
{
|
||||||
if (tf->isref)
|
if (tf->isref)
|
||||||
|
@ -67,10 +63,6 @@ struct PPC64TargetABI : TargetABI {
|
||||||
return ty == Tstruct || ty == Tsarray;
|
return ty == Tstruct || ty == Tsarray;
|
||||||
}
|
}
|
||||||
|
|
||||||
void doneWithFunctionType()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void rewriteFunctionType(TypeFunction* tf, IrFuncTy &fty)
|
void rewriteFunctionType(TypeFunction* tf, IrFuncTy &fty)
|
||||||
{
|
{
|
||||||
// EXPLICIT PARAMETERS
|
// EXPLICIT PARAMETERS
|
||||||
|
|
|
@ -79,9 +79,6 @@ struct TargetABI
|
||||||
/// disabling the LLVM-internal name mangling/postprocessing is required.
|
/// disabling the LLVM-internal name mangling/postprocessing is required.
|
||||||
virtual std::string mangleForLLVM(llvm::StringRef name, LINK l) { return name; }
|
virtual std::string mangleForLLVM(llvm::StringRef name, LINK l) { return name; }
|
||||||
|
|
||||||
/// Called if a new function type is resolved
|
|
||||||
virtual void newFunctionType(TypeFunction* tf) {}
|
|
||||||
|
|
||||||
/// Returns true if the function uses sret (struct return),
|
/// Returns true if the function uses sret (struct return),
|
||||||
/// meaning that it gets a hidden pointer to a struct which has been pre-
|
/// meaning that it gets a hidden pointer to a struct which has been pre-
|
||||||
/// allocated by the caller.
|
/// allocated by the caller.
|
||||||
|
@ -94,9 +91,6 @@ struct TargetABI
|
||||||
virtual void rewriteFunctionType(TypeFunction* t, IrFuncTy &fty) = 0;
|
virtual void rewriteFunctionType(TypeFunction* t, IrFuncTy &fty) = 0;
|
||||||
|
|
||||||
virtual void rewriteArgument(IrFuncTyArg& arg) {}
|
virtual void rewriteArgument(IrFuncTyArg& arg) {}
|
||||||
|
|
||||||
/// Called if resolution of new function type is done
|
|
||||||
virtual void doneWithFunctionType() {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -71,8 +71,6 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
||||||
if (irFty.funcType) return irFty.funcType;
|
if (irFty.funcType) return irFty.funcType;
|
||||||
|
|
||||||
TargetABI* abi = (isIntrinsic ? TargetABI::getIntrinsic() : gABI);
|
TargetABI* abi = (isIntrinsic ? TargetABI::getIntrinsic() : gABI);
|
||||||
// Tell the ABI we're resolving a new function type
|
|
||||||
abi->newFunctionType(f);
|
|
||||||
|
|
||||||
// Do not modify irFty yet; this function may be called recursively if any
|
// Do not modify irFty yet; this function may be called recursively if any
|
||||||
// of the argument types refer to this type.
|
// of the argument types refer to this type.
|
||||||
|
@ -255,9 +253,6 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
||||||
// let the abi rewrite the types as necesary
|
// let the abi rewrite the types as necesary
|
||||||
abi->rewriteFunctionType(f, newIrFty);
|
abi->rewriteFunctionType(f, newIrFty);
|
||||||
|
|
||||||
// Tell the ABI we're done with this function type
|
|
||||||
abi->doneWithFunctionType();
|
|
||||||
|
|
||||||
// Now we can modify irFty safely.
|
// Now we can modify irFty safely.
|
||||||
irFty = llvm_move(newIrFty);
|
irFty = llvm_move(newIrFty);
|
||||||
|
|
||||||
|
|
|
@ -963,9 +963,7 @@ static void LLVM_D_BuildRuntimeModule()
|
||||||
);
|
);
|
||||||
assert(dty->ctype);
|
assert(dty->ctype);
|
||||||
IrFuncTy &irFty = dty->ctype->getIrFuncTy();
|
IrFuncTy &irFty = dty->ctype->getIrFuncTy();
|
||||||
gABI->newFunctionType(dty);
|
|
||||||
gABI->rewriteFunctionType(dty, irFty);
|
gABI->rewriteFunctionType(dty, irFty);
|
||||||
gABI->doneWithFunctionType();
|
|
||||||
#if LDC_LLVM_VER < 303
|
#if LDC_LLVM_VER < 303
|
||||||
fn->addAttribute(1, irFty.args[0]->attrs);
|
fn->addAttribute(1, irFty.args[0]->attrs);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -43,9 +43,7 @@ bool DtoIsPassedByRef(Type* type)
|
||||||
|
|
||||||
RET retStyle(TypeFunction *tf)
|
RET retStyle(TypeFunction *tf)
|
||||||
{
|
{
|
||||||
gABI->newFunctionType(tf);
|
|
||||||
bool sret = gABI->returnInArg(tf);
|
bool sret = gABI->returnInArg(tf);
|
||||||
gABI->doneWithFunctionType();
|
|
||||||
return sret ? RETstack : RETregs;
|
return sret ? RETstack : RETregs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue