diff gcc/rtl-error.c @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
line wrap: on
line diff
--- a/gcc/rtl-error.c	Sun Aug 21 07:07:55 2011 +0900
+++ b/gcc/rtl-error.c	Fri Oct 27 22:46:09 2017 +0900
@@ -1,6 +1,5 @@
 /* RTL specific diagnostic subroutines for GCC
-   Copyright (C) 2001, 2002, 2003, 2004, 2007, 2008, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 2001-2017 Free Software Foundation, Inc.
    Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
 
 This file is part of GCC.
@@ -24,18 +23,16 @@
 #include "coretypes.h"
 #include "tm.h"
 #include "rtl-error.h"
-#include "insn-attr.h"
-#include "insn-config.h"
-#include "input.h"
+#include "diagnostic.h"
 #include "intl.h"
-#include "diagnostic.h"
 
-static location_t location_for_asm (const_rtx);
-static void diagnostic_for_asm (const_rtx, const char *, va_list *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
+static location_t location_for_asm (const rtx_insn *);
+static void diagnostic_for_asm (const rtx_insn *, const char *, va_list *,
+				diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
 
 /* Figure the location of the given INSN.  */
 static location_t
-location_for_asm (const_rtx insn)
+location_for_asm (const rtx_insn *insn)
 {
   rtx body = PATTERN (insn);
   rtx asmop;
@@ -66,18 +63,19 @@
    of the insn INSN.  This is used only when INSN is an `asm' with operands,
    and each ASM_OPERANDS records its own source file and line.  */
 static void
-diagnostic_for_asm (const_rtx insn, const char *msg, va_list *args_ptr,
+diagnostic_for_asm (const rtx_insn *insn, const char *msg, va_list *args_ptr,
 		    diagnostic_t kind)
 {
   diagnostic_info diagnostic;
+  rich_location richloc (line_table, location_for_asm (insn));
 
   diagnostic_set_info (&diagnostic, msg, args_ptr,
-		       location_for_asm (insn), kind);
-  report_diagnostic (&diagnostic);
+		       &richloc, kind);
+  diagnostic_report_diagnostic (global_dc, &diagnostic);
 }
 
 void
-error_for_asm (const_rtx insn, const char *gmsgid, ...)
+error_for_asm (const rtx_insn *insn, const char *gmsgid, ...)
 {
   va_list ap;
 
@@ -87,7 +85,7 @@
 }
 
 void
-warning_for_asm (const_rtx insn, const char *gmsgid, ...)
+warning_for_asm (const rtx_insn *insn, const char *gmsgid, ...)
 {
   va_list ap;