Lines Matching defs:decl
39 i386_pe_type_dllimport_p (tree decl)
41 gcc_assert (TREE_CODE (decl) == VAR_DECL
42 || TREE_CODE (decl) == FUNCTION_DECL);
44 if (TARGET_NOP_FUN_DLLIMPORT && TREE_CODE (decl) == FUNCTION_DECL)
51 if (TREE_CODE (decl) == FUNCTION_DECL
52 && (DECL_DECLARED_INLINE_P (decl)
53 || DECL_TEMPLATE_INSTANTIATION (decl)
54 || DECL_ARTIFICIAL (decl)))
60 else if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
61 && DECL_VIRTUAL_P (decl))
68 if (DECL_INITIAL (decl))
71 "previous dllimport ignored", decl);
73 if (decl == CLASSTYPE_KEY_METHOD (DECL_CONTEXT (decl)))
75 decl);
83 else if (TREE_CODE (decl) == FUNCTION_DECL
84 && (DECL_INITIAL (decl)))
90 else if (TREE_CODE (decl) == VAR_DECL
91 && TREE_STATIC (decl) && TREE_PUBLIC (decl)
92 && !DECL_EXTERNAL (decl))
94 if (!DECL_VIRTUAL_P (decl))
96 "dllimport'd class", decl);
105 i386_pe_type_dllexport_p (tree decl)
107 gcc_assert (TREE_CODE (decl) == VAR_DECL
108 || TREE_CODE (decl) == FUNCTION_DECL);
112 if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
113 && DECL_ARTIFICIAL (decl) && !DECL_THUNK_P (decl))
118 static inline void maybe_add_dllimport (tree decl)
120 if (i386_pe_type_dllimport_p (decl))
121 DECL_DLLIMPORT_P (decl) = 1;
137 /* We don't actually add the attribute to the decl, just set the flag