IVGCVSW-5434 Remove boost/preprocessor.hpp

Change-Id: I51462d18ce0be4b88a23453cfdd16510f30dd1e3
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/src/armnn/Profiling.hpp b/src/armnn/Profiling.hpp
index 08e55a1..c0d37dc 100644
--- a/src/armnn/Profiling.hpp
+++ b/src/armnn/Profiling.hpp
@@ -156,15 +156,21 @@
 
 } // namespace armnn
 
+#define ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC_INNER(lineNumber, backendId, /*name,*/ ...) \
+    armnn::ScopedProfilingEvent e_ ## lineNumber(backendId, /*name,*/ __VA_ARGS__);
 
-#include <boost/preprocessor.hpp>
+#define ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC(lineNumber, backendId, /*name,*/ ...) \
+    ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC_INNER(lineNumber, backendId, /*name,*/ __VA_ARGS__)
 
-#define ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC(backendId, /*name,*/ ...) \
-    armnn::ScopedProfilingEvent BOOST_PP_CAT(e_,__LINE__)(backendId, /*name,*/ __VA_ARGS__);
-
-// The event name must be known at compile time
+// The event name must be known at compile time i.e. if you are going to use this version of the macro
+// in code the first argument you supply after the backendId must be the name.
+// NOTE: need to pass the line number as an argument from here so by the time it gets to the UNIQUE_LOC_INNER
+//       above it has expanded to a string and will concat (##) correctly with the 'e_' prefix to yield a
+//       legal and unique variable name (so long as you don't use the macro twice on the same line).
+//       The concat preprocessing operator (##) very unhelpfully will not expand macros see
+//       https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html for the gory details.
 #define ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(backendId, /*name,*/ ...) \
-    ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC(backendId, /*name,*/ __VA_ARGS__);
+    ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC(__LINE__,backendId, /*name,*/ __VA_ARGS__)
 
 #define ARMNN_SCOPED_PROFILING_EVENT(backendId, name) \
     ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(backendId, name, armnn::WallClockTimer())