Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 68e1bc0

Browse files
author
Sven Verdoolaege
committed
codegen_llvm.cc: move assert to correct location and use static_assert
1 parent d19e547 commit 68e1bc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/polyhedral/codegen_llvm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ thread_local llvm::LLVMContext llvmCtx;
7777

7878
int64_t toSInt(isl::val v) {
7979
CHECK(v.is_int());
80+
static_assert(sizeof(long) <= 8, "long is assumed to fit into 64bits");
8081
return v.get_num_si();
8182
}
8283

@@ -86,7 +87,6 @@ llvm::Value* getLLVMConstantSignedInt64(int64_t v) {
8687

8788
int64_t IslExprToSInt(isl::ast_expr e) {
8889
CHECK(isl_ast_expr_get_type(e.get()) == isl_ast_expr_type::isl_ast_expr_int);
89-
assert(sizeof(long) <= 8); // long is assumed to fit to 64bits
9090
return toSInt(isl::manage(isl_ast_expr_get_val(e.get())));
9191
}
9292

0 commit comments

Comments
 (0)