core: reduce code duplication in codegen/llvm_intrinsic #450
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#450
Loading…
Reference in New Issue
No description provided.
Delete Branch "refactor-llvm_intrinsics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use macros to reduce code duplication in
codegen/llvm_intrinsic
@ -317,0 +175,4 @@
/// Use `into_int_value` for Integer return type and `into_float_value` for Float return type
/// * `$llvm_ty:ident`: Type of first operand
/// * `,($val:ident)*`: Comma separated list of operands
macro_rules! helper_generate_llvm_intrinsic_fn_call {
Remove "helper" and "call" terminology (also in comments, this is not generating a function call).
Renamed macros to:
generate_llvm_intrinsic_fn_body
: Generates the llvm intrinsic build call (body of thecall_llvm_intrinsic
functions).generate_llvm_intrinsic_fn
: Generates the function header and uses the macrogenerate_llvm_intrinsic_fn_body
for function body.