Skip to content

Commit 1033893

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal modernize-use-emplace in fbcode/cinderx/Jit
Differential Revision: D82614889 fbshipit-source-id: bf98a34d2d727b4e0e87dbd2b1a3e603fd2dd182
1 parent 4681609 commit 1033893

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

cinderx/Jit/codegen/code_section.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ void populateCodeSections(
3636
}
3737
auto section_start =
3838
static_cast<char*>(code_base_ptr) + asmjit_section->offset();
39-
code_sections.push_back(std::make_pair(
40-
reinterpret_cast<void*>(section_start), asmjit_section->realSize()));
39+
code_sections.emplace_back(
40+
reinterpret_cast<void*>(section_start), asmjit_section->realSize());
4141
});
4242
}
4343

cinderx/Jit/codegen/gen_asm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ void* NativeGenerator::getVectorcallEntry() {
758758
if (gp_index < ARGUMENT_REGS.size()) {
759759
env_.arg_locations.push_back(ARGUMENT_REGS[gp_index++]);
760760
} else {
761-
env_.arg_locations.push_back(PhyLocation::REG_INVALID);
761+
env_.arg_locations.emplace_back(PhyLocation::REG_INVALID);
762762
}
763763
};
764764

@@ -770,7 +770,7 @@ void* NativeGenerator::getVectorcallEntry() {
770770
} else {
771771
// The register will come in on the stack, and the backend
772772
// will access it via __asm_extra_args.
773-
env_.arg_locations.push_back(PhyLocation::REG_INVALID);
773+
env_.arg_locations.emplace_back(PhyLocation::REG_INVALID);
774774
}
775775
} else {
776776
add_gp();

cinderx/Jit/hir/inliner.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,10 @@ void InlineFunctionCalls::Run(Function& irfunc) {
384384
}
385385

386386
BorrowedRef<PyFunctionObject> callee{target->type().objectSpec()};
387-
to_inline.emplace_back(
388-
AbstractCall{callee, call->numArgs(), call, target});
387+
to_inline.emplace_back(callee, call->numArgs(), call, target);
389388
} else if (instr.IsInvokeStaticFunction()) {
390389
auto call = static_cast<InvokeStaticFunction*>(&instr);
391-
to_inline.emplace_back(
392-
AbstractCall{call->func(), call->NumArgs() - 1, call});
390+
to_inline.emplace_back(call->func(), call->NumArgs() - 1, call);
393391
}
394392
}
395393
}

0 commit comments

Comments
 (0)