File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -698,6 +698,10 @@ new_function (location *loc,
698
698
}
699
699
}
700
700
701
+ bool short_name_found = false ;
702
+ bool should_test_short_name = get_bool_option (GCC_JIT_BOOL_OPTION_DEBUGINFO)
703
+ && get_bool_option (GCC_JIT_BOOL_OPTION_MANGLED_FUNCTION_NAME);
704
+
701
705
for (auto attr: string_attributes)
702
706
{
703
707
gcc_jit_fn_attribute& name = std::get<0 >(attr);
@@ -707,10 +711,21 @@ new_function (location *loc,
707
711
const char * attribute = fn_attribute_to_string (name);
708
712
tree ident = attribute ? get_identifier (attribute) : NULL ;
709
713
714
+ if (should_test_short_name && GCC_JIT_FN_ATTRIBUTE_JIT_DWARF_SHORT_NAME == name) {
715
+ short_name_found = true ;
716
+ should_test_short_name = false ;
717
+ }
718
+
710
719
if (ident)
711
720
fn_attributes = tree_cons (ident, attribute_value, fn_attributes);
712
721
}
713
722
723
+ if (short_name_found)
724
+ {
725
+ SET_DECL_ASSEMBLER_NAME (fndecl, get_identifier (name));
726
+ TREE_PUBLIC (fndecl) = 1 ;
727
+ }
728
+
714
729
for (auto attr: int_array_attributes)
715
730
{
716
731
gcc_jit_fn_attribute& name = std::get<0 >(attr);
You can’t perform that action at this time.
0 commit comments