aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-diagnostic-client-data-hooks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-diagnostic-client-data-hooks.cc')
-rw-r--r--gcc/tree-diagnostic-client-data-hooks.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/tree-diagnostic-client-data-hooks.cc b/gcc/tree-diagnostic-client-data-hooks.cc
index 80717c1..84bd4b5 100644
--- a/gcc/tree-diagnostic-client-data-hooks.cc
+++ b/gcc/tree-diagnostic-client-data-hooks.cc
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "plugin.h"
#include "timevar.h"
-#include "make-unique.h"
/* Concrete class for supplying a diagnostic_context with information
about a specific plugin within the client, when the client is the
@@ -124,12 +123,14 @@ public:
return &m_version_info;
}
- const logical_location *get_current_logical_location () const final override
+ const logical_location_manager *get_logical_location_manager () const final override
{
- if (current_function_decl)
- return &m_current_fndecl_logical_loc;
- else
- return NULL;
+ return &m_logical_location_manager;
+ }
+
+ logical_location_manager::key get_current_logical_location () const final override
+ {
+ return m_logical_location_manager.key_from_tree (current_function_decl);
}
const char *
@@ -154,13 +155,13 @@ public:
stderr.
Implement this by cleaning up the global timer instance now. */
delete g_timer;
- g_timer = NULL;
+ g_timer = nullptr;
}
}
private:
compiler_version_info m_version_info;
- current_fndecl_logical_location m_current_fndecl_logical_loc;
+ tree_logical_location_manager m_logical_location_manager;
};
/* Create a compiler_data_hooks (so that the class can be local
@@ -169,5 +170,5 @@ private:
std::unique_ptr<diagnostic_client_data_hooks>
make_compiler_data_hooks ()
{
- return ::make_unique<compiler_data_hooks> ();
+ return std::make_unique<compiler_data_hooks> ();
}