From f1717f8df9419f72f384448de851f0cd8a64c46e Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Thu, 18 Sep 2014 22:34:23 +0000 Subject: [PATCH] Add header guard to several header files. 2014-09-19 Kito Cheng * except.h: Fix header guard. * addresses.h: Add missing header guard. * cfghooks.h: Likewise. * collect-utils.h: Likewise. * collect2-aix.h: Likewise. * conditions.h: Likewise. * cselib.h: Likewise. * dwarf2asm.h: Likewise. * graphds.h: Likewise. * graphite-scop-detection.h: Likewise. * gsyms.h: Likewise. * hw-doloop.h: Likewise. * incpath.h: Likewise. * ipa-inline.h: Likewise. * ipa-ref.h: Likewise. * ira-int.h: Likewise. * ira.h: Likewise. * lra-int.h: Likewise. * lra.h: Likewise. * lto-section-names.h: Likewise. * read-md.h: Likewise. * reload.h: Likewise. * rtl-error.h: Likewise. * sdbout.h: Likewise. * targhooks.h: Likewise. * tree-affine.h: Likewise. * xcoff.h: Likewise. * xcoffout.h: Likewise. From-SVN: r215365 --- gcc/ChangeLog | 31 +++++++++++++++++++++++++++++++ gcc/addresses.h | 5 +++++ gcc/cfghooks.h | 4 ++++ gcc/collect-utils.h | 5 +++++ gcc/collect2-aix.h | 4 ++++ gcc/conditions.h | 5 +++++ gcc/cselib.h | 5 +++++ gcc/dwarf2asm.h | 4 ++++ gcc/except.h | 5 +++-- gcc/graphds.h | 5 +++++ gcc/graphite-scop-detection.h | 4 ++++ gcc/gsyms.h | 4 ++++ gcc/hw-doloop.h | 5 +++++ gcc/incpath.h | 5 +++++ gcc/ipa-inline.h | 5 +++++ gcc/ipa-ref.h | 5 +++++ gcc/ira-int.h | 5 +++++ gcc/ira.h | 5 +++++ gcc/lra-int.h | 5 +++++ gcc/lra.h | 5 +++++ gcc/lto-section-names.h | 5 +++++ gcc/read-md.h | 5 +++++ gcc/reload.h | 4 ++++ gcc/rtl-error.h | 5 +++++ gcc/sdbout.h | 5 +++++ gcc/targhooks.h | 5 +++++ gcc/tree-affine.h | 5 +++++ gcc/xcoff.h | 5 +++++ gcc/xcoffout.h | 4 ++++ 29 files changed, 162 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de52a05471b..37749c7b4b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,34 @@ +2014-09-19 Kito Cheng + + * except.h: Fix header guard. + * addresses.h: Add missing header guard. + * cfghooks.h: Likewise. + * collect-utils.h: Likewise. + * collect2-aix.h: Likewise. + * conditions.h: Likewise. + * cselib.h: Likewise. + * dwarf2asm.h: Likewise. + * graphds.h: Likewise. + * graphite-scop-detection.h: Likewise. + * gsyms.h: Likewise. + * hw-doloop.h: Likewise. + * incpath.h: Likewise. + * ipa-inline.h: Likewise. + * ipa-ref.h: Likewise. + * ira-int.h: Likewise. + * ira.h: Likewise. + * lra-int.h: Likewise. + * lra.h: Likewise. + * lto-section-names.h: Likewise. + * read-md.h: Likewise. + * reload.h: Likewise. + * rtl-error.h: Likewise. + * sdbout.h: Likewise. + * targhooks.h: Likewise. + * tree-affine.h: Likewise. + * xcoff.h: Likewise. + * xcoffout.h: Likewise. + 2014-09-18 Vladimir Makarov PR debug/63285 diff --git a/gcc/addresses.h b/gcc/addresses.h index e323b588794..3f0089a87f1 100644 --- a/gcc/addresses.h +++ b/gcc/addresses.h @@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see MODE_BASE_REG_REG_CLASS, MODE_BASE_REG_CLASS and BASE_REG_CLASS. Arguments as for the MODE_CODE_BASE_REG_CLASS macro. */ +#ifndef GCC_ADDRESSES_H +#define GCC_ADDRESSES_H + static inline enum reg_class base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED, addr_space_t as ATTRIBUTE_UNUSED, @@ -82,3 +85,5 @@ regno_ok_for_base_p (unsigned regno, enum machine_mode mode, addr_space_t as, return ok_for_base_p_1 (regno, mode, as, outer_code, index_code); } + +#endif /* GCC_ADDRESSES_H */ diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h index 8ff808c5ffa..1b8587a5b1b 100644 --- a/gcc/cfghooks.h +++ b/gcc/cfghooks.h @@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_CFGHOOKS_H +#define GCC_CFGHOOKS_H + /* Only basic-block.h includes this. */ struct cfg_hooks @@ -221,3 +224,4 @@ extern void gimple_register_cfg_hooks (void); extern struct cfg_hooks get_cfg_hooks (void); extern void set_cfg_hooks (struct cfg_hooks); +#endif /* GCC_CFGHOOKS_H */ diff --git a/gcc/collect-utils.h b/gcc/collect-utils.h index 2989c6b1da0..ba1985e0e21 100644 --- a/gcc/collect-utils.h +++ b/gcc/collect-utils.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_COLLECT_UTILS_H +#define GCC_COLLECT_UTILS_H + /* Provided in collect-utils.c. */ extern void notice (const char *, ...) __attribute__ ((format (printf, 1, 2))); @@ -42,3 +45,5 @@ extern const char tool_name[]; /* Called by utils_cleanup. */ extern void tool_cleanup (bool); extern void maybe_unlink (const char *); + +#endif /* GCC_COLLECT_UTILS_H */ diff --git a/gcc/collect2-aix.h b/gcc/collect2-aix.h index 953b8778422..40f855e9661 100644 --- a/gcc/collect2-aix.h +++ b/gcc/collect2-aix.h @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_COLLECT2_AIX_H +#define GCC_COLLECT2_AIX_H /* collect2-aix.c requires mmap support. It should otherwise be fairly portable. */ #if defined(CROSS_DIRECTORY_STRUCTURE) \ @@ -300,3 +302,5 @@ extern int ldtbread (LDFILE *, long, SYMENT *); extern int ldclose (LDFILE *); #endif + +#endif /* GCC_COLLECT2_AIX_H */ diff --git a/gcc/conditions.h b/gcc/conditions.h index 837fff30b10..5162957fbde 100644 --- a/gcc/conditions.h +++ b/gcc/conditions.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_CONDITIONS_H +#define GCC_CONDITIONS_H + /* None of the things in the files exist if we don't use CC0. */ #ifdef HAVE_cc0 @@ -115,3 +118,5 @@ extern CC_STATUS cc_status; CC_STATUS_MDEP_INIT) #endif + +#endif /* GCC_CONDITIONS_H */ diff --git a/gcc/cselib.h b/gcc/cselib.h index ecf53e1ad1b..205f1806ace 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_CSELIB_H +#define GCC_CSELIB_H + /* Describe a value. */ struct cselib_val { /* The hash value. */ @@ -120,3 +123,5 @@ canonical_cselib_val (cselib_val *val) gcc_checking_assert (canonical_cselib_val (canon) == canon); return canon; } + +#endif /* GCC_CSELIB_H */ diff --git a/gcc/dwarf2asm.h b/gcc/dwarf2asm.h index ca76bf69083..1122c856046 100644 --- a/gcc/dwarf2asm.h +++ b/gcc/dwarf2asm.h @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_DWARF2ASM_H +#define GCC_DWARF2ASM_H extern void dw2_assemble_integer (int, rtx); @@ -86,3 +88,5 @@ extern void dw2_asm_output_delta_sleb128 (const char *, const char *, const char *, ...) ATTRIBUTE_NULL_PRINTF_3; #endif + +#endif /* GCC_DWARF2ASM_H */ diff --git a/gcc/except.h b/gcc/except.h index 32591513204..d01a3a083be 100644 --- a/gcc/except.h +++ b/gcc/except.h @@ -22,8 +22,7 @@ along with GCC; see the file COPYING3. If not see that the compiler can keep track of where this file is included. This is e.g. used to avoid including this file in front-end specific files. */ #ifndef GCC_EXCEPT_H -# define GCC_EXCEPT_H -#endif +#define GCC_EXCEPT_H #include "hash-map.h" #include "hashtab.h" @@ -333,3 +332,5 @@ ehr_next (eh_region r, eh_region start) for ((R) = (FN)->eh->region_tree; (R) != NULL; (R) = ehr_next (R, NULL)) #define FOR_ALL_EH_REGION(R) FOR_ALL_EH_REGION_FN (R, cfun) + +#endif diff --git a/gcc/graphds.h b/gcc/graphds.h index 03f969afca5..fbae09c2c55 100644 --- a/gcc/graphds.h +++ b/gcc/graphds.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_GRAPHDS_H +#define GCC_GRAPHDS_H + /* Structure representing edge of a graph. */ struct graph_edge @@ -59,3 +62,5 @@ void graphds_domtree (struct graph *, int, int *, int *, int *); typedef void (*graphds_edge_callback) (struct graph *, struct graph_edge *); void for_each_edge (struct graph *, graphds_edge_callback); void free_graph (struct graph *g); + +#endif /* GCC_GRAPHDS_H */ diff --git a/gcc/graphite-scop-detection.h b/gcc/graphite-scop-detection.h index 8ec7fdc0be7..71b88275eb0 100644 --- a/gcc/graphite-scop-detection.h +++ b/gcc/graphite-scop-detection.h @@ -19,7 +19,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_GRAPHITE_SCOP_DETECTION_H +#define GCC_GRAPHITE_SCOP_DETECTION_H extern void build_scops (vec *); extern void dot_all_scops (vec ); extern void dot_scop (scop_p); + +#endif /* GCC_GRAPHITE_SCOP_DETECTION_H */ diff --git a/gcc/gsyms.h b/gcc/gsyms.h index 3547692e166..3aeb1da3dfa 100644 --- a/gcc/gsyms.h +++ b/gcc/gsyms.h @@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see /* For cross compilation, use the portable definitions from the COFF documentation. */ +#ifndef GCC_GSYMS_H +#define GCC_GSYMS_H #define __GNU_SYMS__ @@ -102,3 +104,5 @@ enum sdb_masks #endif N_TSHIFT = 2 }; + +#endif /* GCC_GSYMS_H */ diff --git a/gcc/hw-doloop.h b/gcc/hw-doloop.h index 52b344dc7e4..1e2a87f2f89 100644 --- a/gcc/hw-doloop.h +++ b/gcc/hw-doloop.h @@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_HW_DOLOOP_H +#define GCC_HW_DOLOOP_H + /* We need to keep a vector of loops */ typedef struct hwloop_info_d *hwloop_info; @@ -153,3 +156,5 @@ struct hw_doloop_hooks }; extern void reorg_loops (bool, struct hw_doloop_hooks *); + +#endif /* GCC_HW_DOLOOP_H */ diff --git a/gcc/incpath.h b/gcc/incpath.h index e86130fbc56..0826d26140f 100644 --- a/gcc/incpath.h +++ b/gcc/incpath.h @@ -15,6 +15,9 @@ along with this program; see the file COPYING3. If not see . */ +#ifndef GCC_INCPATH_H +#define GCC_INCPATH_H + extern void split_quote_chain (void); extern void add_path (char *, int, int, bool); extern void register_include_chains (cpp_reader *, const char *, @@ -32,3 +35,5 @@ struct target_c_incpath_s { extern struct target_c_incpath_s target_c_incpath; enum { QUOTE = 0, BRACKET, SYSTEM, AFTER }; + +#endif /* GCC_INCPATH_H */ diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index 8cbb39fd633..75973230bc5 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_IPA_INLINE_H +#define GCC_IPA_INLINE_H + #include "ipa-prop.h" /* Representation of inline parameters that do depend on context function is @@ -347,3 +350,5 @@ reset_edge_growth_cache (struct cgraph_edge *edge) edge_growth_cache[edge->uid] = zero; } } + +#endif /* GCC_IPA_INLINE_H */ diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h index b8b1f9e4216..6709933596e 100644 --- a/gcc/ipa-ref.h +++ b/gcc/ipa-ref.h @@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_IPA_REF_H +#define GCC_IPA_REF_H + struct cgraph_node; class varpool_node; class symtab_node; @@ -127,3 +130,5 @@ public: or GGC will try to mark middle of references vectors. */ vec GTY((skip)) referring; }; + +#endif /* GCC_IPA_REF_H */ diff --git a/gcc/ira-int.h b/gcc/ira-int.h index 1db064193cd..e3db1c7630d 100644 --- a/gcc/ira-int.h +++ b/gcc/ira-int.h @@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_IRA_INT_H +#define GCC_IRA_INT_H + #include "cfgloop.h" #include "ira.h" #include "alloc-pool.h" @@ -1507,3 +1510,5 @@ ira_allocate_and_set_or_copy_costs (int **vec, enum reg_class aclass, extern rtx ira_create_new_reg (rtx); extern int first_moveable_pseudo, last_moveable_pseudo; + +#endif /* GCC_IRA_INT_H */ diff --git a/gcc/ira.h b/gcc/ira.h index 1d1ec65a237..a3bcbdc8754 100644 --- a/gcc/ira.h +++ b/gcc/ira.h @@ -19,6 +19,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_IRA_H +#define GCC_IRA_H + /* True when we use LRA instead of reload pass for the current function. */ extern bool ira_use_lra_p; @@ -195,3 +198,5 @@ extern bool ira_better_spill_reload_regno_p (int *, int *, rtx, rtx, rtx); extern bool ira_bad_reload_regno (int, rtx, rtx); extern void ira_adjust_equiv_reg_cost (unsigned, int); + +#endif /* GCC_IRA_H */ diff --git a/gcc/lra-int.h b/gcc/lra-int.h index 5afc68c6f11..28903e1cad8 100644 --- a/gcc/lra-int.h +++ b/gcc/lra-int.h @@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_LRA_INT_H +#define GCC_LRA_INT_H + #include "lra.h" #include "bitmap.h" #include "recog.h" @@ -501,3 +504,5 @@ lra_assign_reg_val (int from, int to) lra_reg_info[to].val = lra_reg_info[from].val; lra_reg_info[to].offset = lra_reg_info[from].offset; } + +#endif /* GCC_LRA_INT_H */ diff --git a/gcc/lra.h b/gcc/lra.h index 4d67484b77f..fcdea70a9f7 100644 --- a/gcc/lra.h +++ b/gcc/lra.h @@ -19,6 +19,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_LRA_H +#define GCC_LRA_H + extern bool lra_simple_p; /* Return the allocno reg class of REGNO. If it is a reload pseudo, @@ -37,3 +40,5 @@ extern rtx lra_eliminate_regs (rtx, enum machine_mode, rtx); extern void lra (FILE *); extern void lra_init_once (void); extern void lra_finish_once (void); + +#endif /* GCC_LRA_H */ diff --git a/gcc/lto-section-names.h b/gcc/lto-section-names.h index 19a992d0b63..cb752309872 100644 --- a/gcc/lto-section-names.h +++ b/gcc/lto-section-names.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_LTO_SECTION_NAMES_H +#define GCC_LTO_SECTION_NAMES_H + /* The string that is the prefix on the section names we make for lto. For decls the DECL_ASSEMBLER_NAME is appended to make the section name for the functions and static_initializers. For other types of @@ -26,3 +29,5 @@ along with GCC; see the file COPYING3. If not see /* Segment name for LTO sections. This is only used for Mach-O. */ #define LTO_SEGMENT_NAME "__GNU_LTO" + +#endif /* GCC_LTO_SECTION_NAMES_H */ diff --git a/gcc/read-md.h b/gcc/read-md.h index be26bdd1a4d..cb328b84572 100644 --- a/gcc/read-md.h +++ b/gcc/read-md.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_READ_MD_H +#define GCC_READ_MD_H + #include "obstack.h" #include "hashtab.h" @@ -138,3 +141,5 @@ extern void traverse_enum_types (htab_trav, void *); extern struct enum_type *lookup_enum_type (const char *); extern bool read_md_files (int, char **, bool (*) (const char *), directive_handler_t); + +#endif /* GCC_READ_MD_H */ diff --git a/gcc/reload.h b/gcc/reload.h index eb4ccd3ea2a..e9c109542ea 100644 --- a/gcc/reload.h +++ b/gcc/reload.h @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_RELOAD_H +#define GCC_RELOAD_H /* If secondary reloads are the same for inputs and outputs, define those macros here. */ @@ -458,3 +460,5 @@ extern rtx reload_adjust_reg_for_mode (rtx, enum machine_mode); /* Allocate or grow the reg_equiv tables, initializing new entries to 0. */ extern void grow_reg_equivs (void); + +#endif /* GCC_RELOAD_H */ diff --git a/gcc/rtl-error.h b/gcc/rtl-error.h index 479e2e5b835..ad38545c34a 100644 --- a/gcc/rtl-error.h +++ b/gcc/rtl-error.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_RTL_ERROR_H +#define GCC_RTL_ERROR_H + #include "rtl.h" #include "diagnostic-core.h" @@ -24,3 +27,5 @@ extern void error_for_asm (const rtx_insn *, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern void warning_for_asm (const rtx_insn *, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); + +#endif /* GCC_RTL_ERROR_H */ diff --git a/gcc/sdbout.h b/gcc/sdbout.h index 00368b6ecd6..3d8a8864741 100644 --- a/gcc/sdbout.h +++ b/gcc/sdbout.h @@ -17,5 +17,10 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_SDBOUT_H +#define GCC_SDBOUT_H + extern void sdbout_symbol (tree, int); extern void sdbout_types (tree); + +#endif /* GCC_SDBOUT_H */ diff --git a/gcc/targhooks.h b/gcc/targhooks.h index dad9520c910..9178c30d3fb 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_TARGHOOKS_H +#define GCC_TARGHOOKS_H + extern bool default_legitimate_address_p (enum machine_mode, rtx, bool); extern void default_external_libcall (rtx); @@ -212,3 +215,5 @@ extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); extern bool can_use_doloop_if_innermost (const widest_int &, const widest_int &, unsigned int, bool); + +#endif /* GCC_TARGHOOKS_H */ diff --git a/gcc/tree-affine.h b/gcc/tree-affine.h index 48dd2a79f19..5cf31241e98 100644 --- a/gcc/tree-affine.h +++ b/gcc/tree-affine.h @@ -20,6 +20,9 @@ along with GCC; see the file COPYING3. If not see /* Affine combination of trees. We keep track of at most MAX_AFF_ELTS elements to make things simpler; this is sufficient in most cases. */ +#ifndef GCC_TREE_AFFINE_H +#define GCC_TREE_AFFINE_H + #include "hash-map.h" #include "wide-int.h" @@ -99,3 +102,5 @@ aff_combination_zero_p (aff_tree *aff) return false; } + +#endif /* GCC_TREE_AFFINE_H */ diff --git a/gcc/xcoff.h b/gcc/xcoff.h index 9a07173a0fb..af55ebd02e2 100644 --- a/gcc/xcoff.h +++ b/gcc/xcoff.h @@ -16,6 +16,9 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_XCOFF_H +#define GCC_XCOFF_H + /* Storage classes in XCOFF object file format designed for DBX's use. This info is from the `Files Reference' manual for IBM's AIX version 3 for the RS6000. */ @@ -33,3 +36,5 @@ along with GCC; see the file COPYING3. If not see #define C_DECL 0x8c #define C_ENTRY 0x8d #define C_FUN 0x8e + +#endif /* GCC_XCOFF_H */ diff --git a/gcc/xcoffout.h b/gcc/xcoffout.h index 3373c8e6e7a..b45518c08f8 100644 --- a/gcc/xcoffout.h +++ b/gcc/xcoffout.h @@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#ifndef GCC_XCOFFOUT_H +#define GCC_XCOFFOUT_H /* Tags and typedefs are C_DECL in XCOFF, not C_LSYM. */ @@ -184,3 +186,5 @@ extern void xcoffout_end_block (unsigned, unsigned); extern int xcoff_assign_fundamental_type_number (tree); extern void xcoffout_declare_function (FILE *, tree, const char *); extern void xcoffout_source_line (unsigned int, const char *, int, bool); + +#endif /* GCC_XCOFFOUT_H */ -- 2.30.2