diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-10-12 09:46:38 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-10-12 09:46:38 -0700 |
commit | 9cd320ea6572c577cdf17ce1f9ea5230b166af6d (patch) | |
tree | d1c8e7c2e09a91ed75f0e5476c648c2e745aa2de /gcc/objc/objc-runtime-shared-support.c | |
parent | 4854d721be78358e59367982bdd94461b4be3c5a (diff) | |
parent | 3175d40fc52fb8eb3c3b18cc343d773da24434fb (diff) | |
download | gcc-9cd320ea6572c577cdf17ce1f9ea5230b166af6d.zip gcc-9cd320ea6572c577cdf17ce1f9ea5230b166af6d.tar.gz gcc-9cd320ea6572c577cdf17ce1f9ea5230b166af6d.tar.bz2 |
Merge from trunk revision 3175d40fc52fb8eb3c3b18cc343d773da24434fb.
Diffstat (limited to 'gcc/objc/objc-runtime-shared-support.c')
-rw-r--r-- | gcc/objc/objc-runtime-shared-support.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.c index 4aecc7f..16d4d63 100644 --- a/gcc/objc/objc-runtime-shared-support.c +++ b/gcc/objc/objc-runtime-shared-support.c @@ -117,14 +117,17 @@ add_field_decl (tree type, const char *name, tree **chain) tree start_var_decl (tree type, const char *name) { - tree var = build_decl (input_location, - VAR_DECL, get_identifier (name), type); - TREE_STATIC (var) = 1; + tree name_id = get_identifier (name); + tree var = build_decl (input_location, VAR_DECL, name_id, type); DECL_INITIAL (var) = error_mark_node; /* A real initializer is coming... */ + TREE_STATIC (var) = 1; DECL_IGNORED_P (var) = 1; DECL_ARTIFICIAL (var) = 1; DECL_CONTEXT (var) = NULL_TREE; #ifdef OBJCPLUS + /* Meta-data for the NeXT runtime is expected to be 'extern "C"'. */ + if (flag_next_runtime) + SET_DECL_ASSEMBLER_NAME (var, name_id); DECL_THIS_STATIC (var) = 1; /* squash redeclaration errors */ #endif return var; |