Skip to content

Commit b95b222

Browse files
lwesiersgfxbot
authored andcommitted
Fix for the gcc-9 issue.
Fixes #91 Change-Id: I8149771d6add9645126cb94584f46485c256a488
1 parent 6af4da6 commit b95b222

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

IGC/AdaptorOCL/cif/cif/common/cif.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,14 @@ struct InterfacesList {
309309
requestedInterfaceId, std::forward<DefaultValueT>(defaultValue), std::forward<Args>(args)...);
310310
}
311311

312+
/// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters.
313+
/// Arguments will be forwarded as regular function parameters to Callable::Call.
314+
template <typename Callable, typename RetType, typename DefaultValueT>
315+
static RetType forwardToOne(InterfaceId_t requestedInterfaceId, DefaultValueT &&defaultValue) {
316+
return forwardToOneImpl<0, RetType, Callable, DefaultValueT, InterfacePack<SupportedInterfaces...>>(
317+
requestedInterfaceId, std::forward<DefaultValueT>(defaultValue));
318+
}
319+
312320
/// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters.
313321
/// Arguments will be forwarded as regular function parameters to Callable::Call.
314322
template <typename Callable, typename... Args>

IGC/common/LLVMWarningsPop.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5757
#ifdef _MSC_VER
5858
# pragma warning( pop )
5959
#endif
60+
61+
#if defined(__linux__)
62+
# pragma GCC diagnostic pop
63+
#endif

IGC/common/LLVMWarningsPush.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,18 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5555
# pragma warning( push )
5656
#endif
5757

58+
#if defined(__linux__)
59+
# pragma GCC diagnostic push
60+
#endif
61+
5862
#include <llvm/Config/llvm-config.h>
5963

64+
#if defined(__linux__)
65+
# if __GNUC__ > 8
66+
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
67+
# endif
68+
#endif
69+
6070
#if defined( _WIN32 ) || defined( _WIN64 )
6171

6272
// 'inline' : used more than once

0 commit comments

Comments
 (0)