diff options
-rw-r--r-- | libcc1/libcp1plugin.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 789be2c5adb..7a4270a193a 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -417,7 +417,13 @@ plugin_build_decl (cc1_plugin::connection *self, source_location loc = ctx->get_source_location (filename, line_number); - decl = build_decl (loc, code, identifier, sym_type); + if (code == FUNCTION_DECL) + { + decl = build_lang_decl (code, identifier, sym_type); + DECL_SOURCE_LOCATION (decl) = loc; + } + else + decl = build_decl (loc, code, identifier, sym_type); TREE_USED (decl) = 1; TREE_ADDRESSABLE (decl) = 1; |