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)
|
||||
{
|
||||
if (tf->isref)
|
||||
|
@ -67,10 +63,6 @@ struct PPC64TargetABI : TargetABI {
|
|||
return ty == Tstruct || ty == Tsarray;
|
||||
}
|
||||
|
||||
void doneWithFunctionType()
|
||||
{
|
||||
}
|
||||
|
||||
void rewriteFunctionType(TypeFunction* tf, IrFuncTy &fty)
|
||||
{
|
||||
// EXPLICIT PARAMETERS
|
||||
|
|
|
@ -79,9 +79,6 @@ struct TargetABI
|
|||
/// disabling the LLVM-internal name mangling/postprocessing is required.
|
||||
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),
|
||||
/// meaning that it gets a hidden pointer to a struct which has been pre-
|
||||
/// allocated by the caller.
|
||||
|
@ -94,9 +91,6 @@ struct TargetABI
|
|||
virtual void rewriteFunctionType(TypeFunction* t, IrFuncTy &fty) = 0;
|
||||
|
||||
virtual void rewriteArgument(IrFuncTyArg& arg) {}
|
||||
|
||||
/// Called if resolution of new function type is done
|
||||
virtual void doneWithFunctionType() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -71,8 +71,6 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
|||
if (irFty.funcType) return irFty.funcType;
|
||||
|
||||
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
|
||||
// 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
|
||||
abi->rewriteFunctionType(f, newIrFty);
|
||||
|
||||
// Tell the ABI we're done with this function type
|
||||
abi->doneWithFunctionType();
|
||||
|
||||
// Now we can modify irFty safely.
|
||||
irFty = llvm_move(newIrFty);
|
||||
|
||||
|
|
|
@ -963,9 +963,7 @@ static void LLVM_D_BuildRuntimeModule()
|
|||
);
|
||||
assert(dty->ctype);
|
||||
IrFuncTy &irFty = dty->ctype->getIrFuncTy();
|
||||
gABI->newFunctionType(dty);
|
||||
gABI->rewriteFunctionType(dty, irFty);
|
||||
gABI->doneWithFunctionType();
|
||||
#if LDC_LLVM_VER < 303
|
||||
fn->addAttribute(1, irFty.args[0]->attrs);
|
||||
#else
|
||||
|
|
|
@ -43,9 +43,7 @@ bool DtoIsPassedByRef(Type* type)
|
|||
|
||||
RET retStyle(TypeFunction *tf)
|
||||
{
|
||||
gABI->newFunctionType(tf);
|
||||
bool sret = gABI->returnInArg(tf);
|
||||
gABI->doneWithFunctionType();
|
||||
return sret ? RETstack : RETregs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue