Skip to content

Commit 4c13009

Browse files
lukaszgotszaldintelsys_zuul
authored andcommitted
replace assert to error for not supported llvm version in Scalar.h
Change-Id: I823cd9f3b621c67f5638974770879bdcb019bcfb
1 parent 6cebb42 commit 4c13009

File tree

1 file changed

+4
-2
lines changed
  • IGC/WrapperLLVM/include/llvmWrapper/Transforms

1 file changed

+4
-2
lines changed

IGC/WrapperLLVM/include/llvmWrapper/Transforms/Scalar.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3131

3232
namespace IGCLLVM
3333
{
34-
#if LLVM_VERSION_MAJOR == 4
34+
#if LLVM_VERSION_MAJOR < 4
35+
#error Not supported llvm version.
36+
#elif LLVM_VERSION_MAJOR == 4
3537
inline static llvm::Pass* createLoopUnrollPass(
3638
int OptLevel = 2, int Threshold = -1, int Count = -1,
3739
int AllowPartial = -1, int Runtime = -1,
@@ -59,7 +61,7 @@ namespace IGCLLVM
5961
}
6062
#elif LLVM_VERSION_MAJOR >= 11
6163
//DO NOT assume same function signature for all incoming llvm versions! Double check to upgrade!
62-
assert(!"Not supported llvm version!");
64+
#error Not supported llvm version.
6365
#endif
6466
}
6567
#endif

0 commit comments

Comments
 (0)