IVGCVSW-3306 Fix build errors in 1.2/HalPolicy.cpp

Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: I0c76de5f7aead831ed699e6e136e628edfccc2f5
diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp
index 4cac12a..a82db80 100644
--- a/1.2/HalPolicy.cpp
+++ b/1.2/HalPolicy.cpp
@@ -480,19 +480,23 @@
         return Fail("%s: Could not read output", __func__);
     }
 
-    const armnn::TensorInfo& outInfo = GetTensorInfoForOperand(*outputOperand);
+    armnn::TensorInfo outInfo = GetTensorInfoForOperand(*outputOperand);
     if (IsDynamicOutput(outInfo))
     {
         ALOGD("Output shape not set, will infer from inputs");
         outInfo.SetShape(InferMaximumOutputShape(input0.GetTensorInfo().GetShape(), input1.GetTensorInfo().GetShape()));
     }
 
-    if (!IsLayerSupportedForAnyBackend(__func__,
-                                       armnn::IsMaximumSupported,
-                                       data.m_Backends,
-                                       input0.GetTensorInfo(),
-                                       input1.GetTensorInfo(),
-                                       outInfo))
+    bool isSupported = false;
+    FORWARD_LAYER_SUPPORT_FUNC(__func__,
+                               IsMaximumSupported,
+                               data.m_Backends,
+                               isSupported,
+                               input0.GetTensorInfo(),
+                               input1.GetTensorInfo(),
+                               outInfo);
+
+    if (!isSupported)
     {
         return false;
     }