From 4d98eb390eeb7d9a04d33a6f0cc6ade35aa1367a Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 20 Jun 2019 06:22:00 -0400 Subject: [PATCH 27/85] FIXME: add missing diagnostic-metadata.h --- gcc/diagnostic-metadata.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 gcc/diagnostic-metadata.h diff --git a/gcc/diagnostic-metadata.h b/gcc/diagnostic-metadata.h new file mode 100644 index 0000000..2103971 --- /dev/null +++ b/gcc/diagnostic-metadata.h @@ -0,0 +1,44 @@ +/* Arbitrary key-value pairs for a diagnostic. + Copyright (C) 2019 Free Software Foundation, Inc. + Contributed by David Malcolm + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#ifndef GCC_DIAGNOSTIC_METADATA_H +#define GCC_DIAGNOSTIC_METADATA_H + +/* FIXME. */ + +class diagnostic_metadata +{ + public: + diagnostic_metadata () : m_cwe (0) {} + + void add_cwe (int cwe) { m_cwe = cwe; } + int get_cwe () const { return m_cwe; } + + // TODO: how to store? + private: + int m_cwe; +#if 0 + typedef hash_map > map_t; + map_t m_map; +#endif +}; + +#endif /* ! GCC_DIAGNOSTIC_METADATA_H */ -- 1.8.5.3