diff options
author | George Kyriazis <[email protected]> | 2018-03-10 00:04:11 -0600 |
---|---|---|
committer | George Kyriazis <[email protected]> | 2018-04-18 10:51:38 -0500 |
commit | a92cc09c7a68ed9f0a9efde1cf98a13be0cbcedb (patch) | |
tree | 6859bd818b4238a348e41041eb96828227f579cb /src/gallium/drivers | |
parent | 0f6fef96329314262cf03fe91734b0ce9cce3fa0 (diff) |
swr/rast: Changes to allow jitter to compile with LLVM5
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp index 031bced8a0a..b1d60765e50 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp @@ -1,5 +1,5 @@ /**************************************************************************** -* Copyright (C) 2017 Intel Corporation. All Rights Reserved. +* Copyright (C) 2017-2018 Intel Corporation. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -112,6 +112,22 @@ using PassManager = llvm::legacy::PassManager; #include "llvm/ExecutionEngine/JITEventListener.h" #endif +#if LLVM_VERSION_MAJOR >= 5 +static const auto Sync_CrossThread = llvm::SyncScope::System; +static const auto Attrib_FunctionIndex = llvm::AttributeList::FunctionIndex; +static inline llvm::AttributeSet GetFuncAttribSet(llvm::LLVMContext& ctx, const llvm::AttrBuilder &b) +{ + return llvm::AttributeSet::get(ctx, b); +} +#else +static const auto Sync_CrossThread = llvm::SynchronizationScope::CrossThread; +static const auto Attrib_FunctionIndex = llvm::AttributeSet::FunctionIndex; +static inline llvm::AttributeSet GetFuncAttribSet(llvm::LLVMContext& ctx, const llvm::AttrBuilder &b) +{ + return llvm::AttributeSet::get(ctx, Attrib_FunctionIndex, b); +} +#endif + #pragma pop_macro("DEBUG") |