File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,13 @@ struct RuntimeLibcallsInfo {
103
103
104
104
private:
105
105
// / Stores the name each libcall.
106
- const char *LibcallRoutineNames[RTLIB::UNKNOWN_LIBCALL + 1 ];
106
+ const char *LibcallRoutineNames[RTLIB::UNKNOWN_LIBCALL + 1 ] = {nullptr };
107
+
108
+ static_assert (static_cast <int >(CallingConv::C) == 0 ,
109
+ " default calling conv should be encoded as 0" );
107
110
108
111
// / Stores the CallingConv that should be used for each libcall.
109
- CallingConv::ID LibcallCallingConvs[RTLIB::UNKNOWN_LIBCALL];
112
+ CallingConv::ID LibcallCallingConvs[RTLIB::UNKNOWN_LIBCALL] = {} ;
110
113
111
114
// / The condition type that should be used to test the result of each of the
112
115
// / soft floating-point comparison libcall against integer zero.
Original file line number Diff line number Diff line change @@ -284,8 +284,7 @@ void RuntimeLibcallsInfo::initSoftFloatCmpLibcallPredicates() {
284
284
// / Set default libcall names. If a target wants to opt-out of a libcall it
285
285
// / should be placed here.
286
286
void RuntimeLibcallsInfo::initLibcalls (const Triple &TT) {
287
- std::fill (std::begin (LibcallRoutineNames), std::end (LibcallRoutineNames),
288
- nullptr );
287
+ initSoftFloatCmpLibcallPredicates ();
289
288
290
289
initSoftFloatCmpLibcallPredicates ();
291
290
@@ -295,10 +294,6 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
295
294
#undef HANDLE_LIBCALL
296
295
#undef LIBCALL_NO_NAME
297
296
298
- // Initialize calling conventions to their default.
299
- for (int LC = 0 ; LC < RTLIB::UNKNOWN_LIBCALL; ++LC)
300
- setLibcallCallingConv ((RTLIB::Libcall)LC, CallingConv::C);
301
-
302
297
// Use the f128 variants of math functions on x86
303
298
if (TT.isX86 () && TT.isGNUEnvironment ()) {
304
299
setLibcallName (RTLIB::REM_F128, " fmodf128" );
You can’t perform that action at this time.
0 commit comments