summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch
new file mode 100644
index 00000000..b88e9678
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch
@@ -0,0 +1,46 @@
1From a58dd6de4c29595a0f93cff167b487d777e4559e Mon Sep 17 00:00:00 2001
2From: "Szymichowski, Pawel" <pawel.szymichowski@intel.com>
3Date: Wed, 8 Apr 2020 08:24:05 -0700
4Subject: [PATCH] Changes in code.
5
6Change-Id: Ica75407e834f6b3439912bd0b47a6b30a6521fc7
7
8Upstream-Status: Backport
9Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
10---
11 visa/iga/IGALibrary/api/igax.hpp | 21 ++++++++++++---------
12 1 file changed, 12 insertions(+), 9 deletions(-)
13
14diff --git a/visa/iga/IGALibrary/api/igax.hpp b/visa/iga/IGALibrary/api/igax.hpp
15index 4f1c680c6a9..6d17cd99b6a 100644
16--- a/visa/iga/IGALibrary/api/igax.hpp
17+++ b/visa/iga/IGALibrary/api/igax.hpp
18@@ -492,16 +492,19 @@ inline iga::Op OpSpec::op() const
19 }
20
21
22-#define IGA_OPSPEC_STRING_GETTER(API, INITSIZE) { \
23- char _staticBuf[INITSIZE]; \
24- char *strPtr = &_staticBuf[0]; \
25- size_t strCap = sizeof(_staticBuf); \
26- IGA_CHECKED_CALL(API, m_op, strPtr, &strCap); \
27- if (strCap > sizeof(_staticBuf)) { \
28- strPtr = (char *)alloca(strCap); \
29+#define IGA_OPSPEC_STRING_GETTER(API, INITSIZE) { \
30+ char _staticBuf[INITSIZE]; \
31+ char *strPtr = &_staticBuf[0]; \
32+ size_t strCap = sizeof(_staticBuf); \
33+ IGA_CHECKED_CALL(API, m_op, strPtr, &strCap); \
34+ if (strCap > sizeof(_staticBuf)) { \
35+ strPtr = (char *)malloc(strCap); \
36 IGA_CHECKED_CALL(API, m_op, strPtr, &strCap); \
37- } \
38- return std::string(strPtr); \
39+ std::string res(strPtr); \
40+ free(strPtr); \
41+ return res; \
42+ } \
43+ return std::string(strPtr); \
44 }
45 inline std::string OpSpec::menmonic() const
46 IGA_OPSPEC_STRING_GETTER(iga_opspec_mnemonic, 16);