From 57666bbc133d252a2b9f1c2879e91351a437477f Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 16 May 2018 14:51:49 -0400
Subject: [PATCH 64/83] Rename 'location' to 'optinfo_impl_location'

---
 gcc/optinfo-emit-json.cc |  2 +-
 gcc/optinfo.cc           |  2 +-
 gcc/optinfo.h            | 16 ++++++++--------
 gcc/tree-vect-loop.c     |  2 +-
 gcc/tree-vectorizer.h    |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/gcc/optinfo-emit-json.cc b/gcc/optinfo-emit-json.cc
index 1e1b77e..d55ed53 100644
--- a/gcc/optinfo-emit-json.cc
+++ b/gcc/optinfo-emit-json.cc
@@ -42,7 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 /* FIXME.  */
 
 static json::object *
-impl_location_to_json (location loc)
+impl_location_to_json (optinfo_impl_location loc)
 {
   json::object *obj = new json::object ();
   obj->set ("file", new json::string (loc.m_file));
diff --git a/gcc/optinfo.cc b/gcc/optinfo.cc
index f689249..1ed68f0 100644
--- a/gcc/optinfo.cc
+++ b/gcc/optinfo.cc
@@ -121,7 +121,7 @@ optinfo::emit () const
 
 /* pending_optinfo's ctor.  */
 
-pending_optinfo::pending_optinfo (const location &impl_location,
+pending_optinfo::pending_optinfo (const optinfo_impl_location &impl_location,
 				  enum optinfo_kind kind,
 				  optinfo_location loc)
   : m_optinfo (new optinfo (impl_location, kind, loc))
diff --git a/gcc/optinfo.h b/gcc/optinfo.h
index e3d2f7d..a9d4f77 100644
--- a/gcc/optinfo.h
+++ b/gcc/optinfo.h
@@ -120,9 +120,9 @@ class optinfo_location
    is being emitted from.  */
 /* FIXME: taken from selftest::location.  */
 
-struct location
+struct optinfo_impl_location
 {
-  location (const char *file, int line, const char *function)
+  optinfo_impl_location (const char *file, int line, const char *function)
     : m_file (file), m_line (line), m_function (function) {}
 
   const char *m_file;
@@ -133,7 +133,7 @@ struct location
 /* FIXME.  */
 
 #define OPTINFO_IMPL_LOCATION \
-  (location (__FILE__, __LINE__, __FUNCTION__))
+  (optinfo_impl_location (__FILE__, __LINE__, __FUNCTION__))
 
 /* The various kinds of optinfo.  */
 
@@ -156,14 +156,14 @@ class optinfo
 {
   friend class pending_optinfo;
  public:
-  optinfo (const location &impl_location,
+  optinfo (const optinfo_impl_location &impl_location,
 	   enum optinfo_kind kind,
 	   optinfo_location loc)
     : m_impl_location (impl_location), m_kind (kind), m_loc (loc), m_items ()
   {}
   ~optinfo ();
 
-  location get_impl_location () const { return m_impl_location; }
+  optinfo_impl_location get_impl_location () const { return m_impl_location; }
   enum optinfo_kind get_kind () const { return m_kind; }
   optinfo_location get_location () const { return m_loc; }
   unsigned int num_items () const { return m_items.length (); }
@@ -175,7 +175,7 @@ class optinfo
    void emit () const;
 
  private:
-  location m_impl_location;
+  optinfo_impl_location m_impl_location;
   enum optinfo_kind m_kind;
   optinfo_location m_loc;
   auto_vec <optinfo_item *> m_items;
@@ -208,7 +208,7 @@ class optinfo_printf
 class pending_optinfo
 {
  public:
-  pending_optinfo (const location &impl_location,
+  pending_optinfo (const optinfo_impl_location &impl_location,
 		   enum optinfo_kind kind,
 		   optinfo_location loc);
 
@@ -276,7 +276,7 @@ class optinfo_scope
 {
  public:
   optinfo_scope (const char *name, optinfo_location loc,
-		 const location &impl_location)
+		 const optinfo_impl_location &impl_location)
   : m_name (name), m_loc (loc)
   {
     if (optinfo_enabled_p ())
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index b25024ac..6e6da09 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -159,7 +159,7 @@ static void vect_estimate_min_profitable_iters (loop_vec_info, int *, int *);
 /* FIXME.  */
 
 pending_optinfo
-emit_optinfo_at_vect_location (const location &impl_location,
+emit_optinfo_at_vect_location (const optinfo_impl_location &impl_location,
 			       enum optinfo_kind kind)
 {
   return pending_optinfo (impl_location, kind, vect_optinfo_location);
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 9854e23..fb4bf5a 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1389,7 +1389,7 @@ extern source_location vect_location;
 extern optinfo_location vect_optinfo_location;
 
 extern pending_optinfo
-emit_optinfo_at_vect_location (const location &impl_location,
+emit_optinfo_at_vect_location (const optinfo_impl_location &impl_location,
 			       enum optinfo_kind kind);
 
 /* Emit optimization information at the vect location.  */
-- 
1.8.5.3

