core: reduce code duplication in codegen/extern_fns #453
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#453
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "refactor-extern_fns"
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?
Used macros to reduce code duplication in
codegen/extern_fns
@ -11,3 +7,1 @@
name: Option<&str>,
) -> FloatValue<'ctx> {
const FN_NAME: &str = "tan";
/// Macro to conveniently generate extern function call
Again, this is generating functions, not function calls.
Updated comments.
@ -101,0 +80,4 @@
/// The default attributes are "mustprogress", "nofree", "nounwind", "willreturn", and "writeonly"
/// These will be used unless other attributes are specified
///
macro_rules! generate_extern_binary_fn_call {
It's rather confusing what is "helper" and what is not. Can you find a better name, or remove "helper" entirely?
Removed helper entirely and merged the macros into
generate_extern_fn
macro