File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,18 @@ static inline bool is_intrinsic_function(const ASR::Function_t *fn) {
368
368
return false ;
369
369
}
370
370
371
+ // Returns true if the Function is intrinsic, otherwise false
372
+ // This version uses the `intrinsic` member of `Module`, so it
373
+ // should be used instead of is_intrinsic_function
374
+ static inline bool is_intrinsic_function2 (const ASR::Function_t *fn) {
375
+ ASR::symbol_t *sym = (ASR::symbol_t *)fn;
376
+ ASR::Module_t *m = get_sym_module0 (sym);
377
+ if (m != nullptr ) {
378
+ if (m->m_intrinsic ) return true ;
379
+ }
380
+ return false ;
381
+ }
382
+
371
383
// Returns true if all arguments have a `value`
372
384
static inline bool all_args_have_value (const Vec<ASR::expr_t *> &args) {
373
385
for (auto &a : args) {
You can’t perform that action at this time.
0 commit comments