forked from OSchip/llvm-project
TargetLowering: Fix InitLibcallCallingConvs() overriding things set in InitLibcalls()
I missed the fact that the later called InitLibcallCallingConvs() overrides some things set in InitLibcalls() when I did the refactoring in r321036. Fix by merging InitLibcallCallingConvs() into InitLibcalls() and doing the initialization earlier. llvm-svn: 321045
This commit is contained in:
parent
bd0416d0c0
commit
92de8b2405
|
@ -117,6 +117,9 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) {
|
|||
setLibcallName(RTLIB::code, name);
|
||||
#include "llvm/CodeGen/RuntimeLibcalls.def"
|
||||
#undef HANDLE_LIBCALL
|
||||
// Initialize calling conventions to their default.
|
||||
for (int LC = 0; LC < RTLIB::UNKNOWN_LIBCALL; ++LC)
|
||||
setLibcallCallingConv((RTLIB::Libcall)LC, CallingConv::C);
|
||||
|
||||
// A few names are different on particular architectures or environments.
|
||||
if (TT.isOSDarwin()) {
|
||||
|
@ -158,12 +161,6 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) {
|
|||
}
|
||||
}
|
||||
|
||||
/// Set default libcall CallingConvs.
|
||||
static void InitLibcallCallingConvs(CallingConv::ID *CCs) {
|
||||
for (int LC = 0; LC < RTLIB::UNKNOWN_LIBCALL; ++LC)
|
||||
CCs[LC] = CallingConv::C;
|
||||
}
|
||||
|
||||
/// getFPEXT - Return the FPEXT_*_* value for the given types, or
|
||||
/// UNKNOWN_LIBCALL if there is none.
|
||||
RTLIB::Libcall RTLIB::getFPEXT(EVT OpVT, EVT RetVT) {
|
||||
|
@ -552,7 +549,6 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm) : TM(tm) {
|
|||
|
||||
InitLibcalls(TM.getTargetTriple());
|
||||
InitCmpLibcallCCs(CmpLibcallCCs);
|
||||
InitLibcallCallingConvs(LibcallCallingConvs);
|
||||
}
|
||||
|
||||
void TargetLoweringBase::initActions() {
|
||||
|
|
Loading…
Reference in New Issue