summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-19 19:55:33 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-19 19:55:33 +0000
commit367b1459a0a977c75979523f7cb6b7c8925effd1 (patch)
treefca433b11c05a5a771c4a816fb110130e6e63fcb /gcc/ada/gcc-interface
parent5278936147992d23260efa65de66fb7429c096b3 (diff)
downloadgcc-367b1459a0a977c75979523f7cb6b7c8925effd1.tar.gz
gcc/
* target.def (output_ident): New hook. * targhooks.h (default_asm_output_ident_directive): Add prototype. * varasm.c (assemble_asm): Only prefix a tab if the string does not already start with one. (default_asm_output_ident_directive): New function to emit .ident as a top-level asm node while parsing, or directly to asm_out_file after parsing. * toplev.c (compile_file): Print a GCC .ident with targetm.asm_out.output_ident. * doc/tm.texi.in (ASM_OUTPUT_IDENT): Remove documentation for macro. (TARGET_ASM_OUTPUT_IDENT): Add @hook for this. * doc/tm.texi: Update. * config/elfos.h (ASM_OUTPUT_IDENT, IDENT_ASM_OP): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/i386/djgpp.h (IDENT_ASM_OP): Remove. * config/i386/gas.h (ASM_OUTPUT_IDENT): Remove. * config/arm/aout.h (ASM_OUTPUT_IDENT): Remove. * config/sparc/sparc.h (IDENT_ASM_OP): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/picochip/picochip.h (IDENT_ASM_OP): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/cris/cris-protos.h (cris_asm_output_ident): Add prototype. * config/cris/cris.c (cris_asm_output_ident): New function. * config/cris/cris.h (ASM_OUTPUT_IDENT, IDENT_ASM_OP): Remove. * config/microblaze/microblaze-protos.h (microblaze_asm_output_ident): Add prototype. * config/microblaze/microblaze.c: Include cgraph.h for add_asm_node. (microblaze_asm_output_ident): Rewrite to work similar to default_asm_output_ident_directive for front-end .idents. * config/microblaze/microblaze.h (ASM_OUTPUT_IDENT): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/mips/mips.h (ASM_OUTPUT_IDENT): Remove. * config/mips/sde.h (IDENT_ASM_OP, ASM_OUTPUT_IDENT): Remove. * config/rx/rx.c: Include cgraph.h for add_asm_node. (rx_asm_output_ident): New function, similar to default_asm_output_ident_directive, but handle AS100 syntax also, so that #ident also works for rx in AS100 syntax. (TARGET_ASM_OUTPUT_IDENT): Define. * config/rx/rx.h (IDENT_ASM_OP): Remove. * Makefile.in: Fix dependencies for c-family/c-lex.o. c-family/ * c-lex.c: Do not include output.h. (cb_ident): Try to put out .ident with targetm.asm_out.output_ident. Remove uses of ASM_OUTPUT_IDENT. ada/ * gcc-interface/trans.c: Include target.h. (gigi): Try to put out .ident with targetm.asm_out.output_ident. Remove uses of ASM_OUTPUT_IDENT. * gcc-interface/Make-lang.in: Fix dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in2
-rw-r--r--gcc/ada/gcc-interface/trans.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index b84ebd26c2f..c9ddd9bfc4d 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -1014,7 +1014,7 @@ ada/targtyps.o : ada/gcc-interface/targtyps.c $(CONFIG_H) $(SYSTEM_H) \
ada/trans.o : ada/gcc-interface/trans.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(FLAGS_H) output.h tree-iterator.h $(GIMPLE_H) \
- $(BITMAP_H) $(CGRAPH_H) ada/gcc-interface/ada.h ada/adadecode.h \
+ $(BITMAP_H) $(CGRAPH_H) $(TARGET_H) ada/gcc-interface/ada.h ada/adadecode.h \
ada/types.h ada/atree.h ada/elists.h ada/namet.h ada/nlists.h ada/snames.h \
ada/stringt.h ada/uintp.h ada/urealp.h ada/fe.h ada/sinfo.h ada/einfo.h \
ada/gcc-interface/gadaint.h $(ADA_TREE_H) ada/gcc-interface/gigi.h \
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 65231bde848..27750a6e4a4 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -36,6 +36,7 @@
#include "gimple.h"
#include "bitmap.h"
#include "cgraph.h"
+#include "target.h"
#include "ada.h"
#include "adadecode.h"
@@ -647,12 +648,9 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
VEC_safe_push (tree, gc, gnu_program_error_label_stack, NULL_TREE);
/* Process any Pragma Ident for the main unit. */
-#ifdef ASM_OUTPUT_IDENT
if (Present (Ident_String (Main_Unit)))
- ASM_OUTPUT_IDENT
- (asm_out_file,
- TREE_STRING_POINTER (gnat_to_gnu (Ident_String (Main_Unit))));
-#endif
+ targetm.asm_out.output_ident
+ (TREE_STRING_POINTER (gnat_to_gnu (Ident_String (Main_Unit))));
/* If we are using the GCC exception mechanism, let GCC know. */
if (Exception_Mechanism == Back_End_Exceptions)