Consistency in memset calls.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace cpu {
|
||||
namespace backend {
|
||||
|
||||
Backend::Backend(Processor* processor) : processor_(processor) {
|
||||
memset(&machine_info_, 0, sizeof(machine_info_));
|
||||
std::memset(&machine_info_, 0, sizeof(machine_info_));
|
||||
}
|
||||
|
||||
Backend::~Backend() = default;
|
||||
|
||||
@@ -39,7 +39,7 @@ RegisterAllocationPass::RegisterAllocationPass(const MachineInfo* machine_info)
|
||||
// Initialize register sets.
|
||||
// TODO(benvanik): rewrite in a way that makes sense - this is terrible.
|
||||
auto mi_sets = machine_info->register_sets;
|
||||
memset(&usage_sets_, 0, sizeof(usage_sets_));
|
||||
std::memset(&usage_sets_, 0, sizeof(usage_sets_));
|
||||
uint32_t n = 0;
|
||||
while (mi_sets[n].count) {
|
||||
auto& mi_set = mi_sets[n];
|
||||
|
||||
@@ -70,8 +70,8 @@ bool PPCHIRBuilder::Emit(FunctionInfo* symbol_info, uint32_t flags) {
|
||||
size_t list_size = instr_count_ * sizeof(void*);
|
||||
instr_offset_list_ = (Instr**)arena_->Alloc(list_size);
|
||||
label_list_ = (Label**)arena_->Alloc(list_size);
|
||||
memset(instr_offset_list_, 0, list_size);
|
||||
memset(label_list_, 0, list_size);
|
||||
std::memset(instr_offset_list_, 0, list_size);
|
||||
std::memset(label_list_, 0, list_size);
|
||||
|
||||
// Always mark entry with label.
|
||||
label_list_[0] = NewLabel();
|
||||
|
||||
@@ -26,7 +26,7 @@ FunctionInfo::FunctionInfo(Module* module, uint32_t address)
|
||||
end_address_(0),
|
||||
behavior_(BEHAVIOR_DEFAULT),
|
||||
function_(0) {
|
||||
memset(&extern_info_, 0, sizeof(extern_info_));
|
||||
std::memset(&extern_info_, 0, sizeof(extern_info_));
|
||||
}
|
||||
|
||||
FunctionInfo::~FunctionInfo() = default;
|
||||
|
||||
Reference in New Issue
Block a user