diff --git a/gen/abi-ppc64.cpp b/gen/abi-ppc64.cpp index 4398fb9164..03bed4a113 100644 --- a/gen/abi-ppc64.cpp +++ b/gen/abi-ppc64.cpp @@ -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 diff --git a/gen/abi.h b/gen/abi.h index 3c8c051d5d..ebb76ef600 100644 --- a/gen/abi.h +++ b/gen/abi.h @@ -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 diff --git a/gen/functions.cpp b/gen/functions.cpp index 28992adfcb..b96031eebf 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -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); diff --git a/gen/runtime.cpp b/gen/runtime.cpp index 3cca5f96ae..9d1f4989d7 100644 --- a/gen/runtime.cpp +++ b/gen/runtime.cpp @@ -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 diff --git a/gen/tollvm.cpp b/gen/tollvm.cpp index 3d0a54db41..7d4f302f31 100644 --- a/gen/tollvm.cpp +++ b/gen/tollvm.cpp @@ -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; }