summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-12-19 00:20:33 +0000
committerMatthias Braun <matze@braunis.de>2017-12-19 00:20:33 +0000
commit92de8b2405b2bdb7e4e27ef95e050273e1a03ea8 (patch)
tree5be9051775252591d12f87ee849af5a0a9e5f83d /llvm
parentbd0416d0c059512877c928776b56207fc359e345 (diff)
downloadbcm5719-llvm-92de8b2405b2bdb7e4e27ef95e050273e1a03ea8.tar.gz
bcm5719-llvm-92de8b2405b2bdb7e4e27ef95e050273e1a03ea8.zip
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
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 133d0c5a497..8a3e6791034 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -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() {
OpenPOWER on IntegriCloud