tf_fuzz: refactor includes to only include what is needed
* Refactor Makefile to automatically gather prerequisites.
* Change the includes (using include-what-you-need) so that files only
include the specific headers they need. Many includes are also now
inside the .hpp files instead of the .cpp files.
This improves editor support: previously, external symbols in .hpp
files would not be resolved by clangd due to .hpp files not having any
imports.
Change-Id: Iece03f81c35aa43ac026aaeb49b87d2c4acf07cd
Signed-off-by: Nik Dewally <Nik.Dewally@arm.com>
diff --git a/tf_fuzz/tfz-cpp/utility/data_blocks.hpp b/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
index 5b26e1b..1e56836 100644
--- a/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
+++ b/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
@@ -5,7 +5,17 @@
*
*/
+#include <stdint.h>
#include <string>
+#include <vector>
+#include <iosfwd>
+
+class psa_asset;
+
+enum class psa_asset_type;
+class psa_call;
+
+enum class asset_search;
/* These classes "cut down the clutter" by grouping together related data and
associated methods (most importantly their constructors) used in template_
@@ -14,12 +24,6 @@
#ifndef DATA_BLOCKS_HPP
#define DATA_BLOCKS_HPP
-/* This project's header files #including other project headers quickly becomes
- unrealistically complicated. The only solution is for each .cpp to include
- the headers it needs. However these in particular are mostly axiomatic: Not
- dependent upon other classes. */
-
-
using namespace std;