================ @@ -103,10 +103,14 @@ struct RuntimeLibcallsInfo { private: /// Stores the name each libcall. - const char *LibcallRoutineNames[RTLIB::UNKNOWN_LIBCALL + 1]; + const char *LibcallRoutineNames[RTLIB::UNKNOWN_LIBCALL + 1] = {nullptr}; + + static_assert(static_cast<int>(CallingConv::C) == 0, + "default calling conv should be encoded as 0"); /// Stores the CallingConv that should be used for each libcall. - CallingConv::ID LibcallCallingConvs[RTLIB::UNKNOWN_LIBCALL]; + CallingConv::ID LibcallCallingConvs[RTLIB::UNKNOWN_LIBCALL] = { + CallingConv::C}; ---------------- efriedma-quic wrote:
Explicitly writing "CallingConv::C" here is confusing; either just use `{}`, or use something like SmallVector that actually has a constructor which fills an arbitrary value. https://github.com/llvm/llvm-project/pull/143082 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits