diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-09-20 05:52:26 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-09-20 05:52:26 -0400 |
commit | 255680cfb0c2be0083f46f9cacdeba9342275b41 (patch) | |
tree | 4aac7a0572bfbf7131e9e776dcae9a91291424de | |
parent | 457816e2e2cfcb8a5a2e1112cd464f5040e7fdc3 (diff) | |
download | gcc-255680cfb0c2be0083f46f9cacdeba9342275b41.zip gcc-255680cfb0c2be0083f46f9cacdeba9342275b41.tar.gz gcc-255680cfb0c2be0083f46f9cacdeba9342275b41.tar.bz2 |
(emit_insn_after_with_line_notes): New function.
From-SVN: r2190
-rw-r--r-- | gcc/emit-rtl.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 2f2cdcc..3bd88b6 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2083,6 +2083,28 @@ emit_insn_after (pattern, after) return insn; } +/* Similar to emit_insn_after, except that line notes are to be inserted so + as to act as if this insn were at FROM. */ + +void +emit_insn_after_with_line_notes (pattern, after, from) + rtx pattern, after, from; +{ + rtx from_line = find_line_note (from); + rtx after_line = find_line_note (after); + rtx insn = emit_insn_after (pattern, after); + + if (from_line) + emit_line_note_after (NOTE_SOURCE_FILE (from_line), + NOTE_LINE_NUMBER (from_line), + after); + + if (after_line) + emit_line_note_after (NOTE_SOURCE_FILE (after_line), + NOTE_LINE_NUMBER (after_line), + insn); +} + /* Make an insn of code JUMP_INSN with body PATTERN and output it after the insn AFTER. */ |