summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslCodeGeneration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index d5c3a9f4359..327d2cf1476 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -505,20 +505,18 @@ IntegerType *IslExprBuilder::getType(__isl_keep isl_ast_expr *Expr) {
Value *IslExprBuilder::createInt(__isl_take isl_ast_expr *Expr) {
assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_int &&
"Expression not of type isl_ast_expr_int");
- isl_int Int;
+ isl_val *Val;
Value *V;
APInt APValue;
IntegerType *T;
- isl_int_init(Int);
- isl_ast_expr_get_int(Expr, &Int);
- APValue = APInt_from_MPZ(Int);
+ Val = isl_ast_expr_get_val(Expr);
+ APValue = APIntFromVal(Val);
T = getType(Expr);
APValue = APValue.sextOrSelf(T->getBitWidth());
V = ConstantInt::get(T, APValue);
isl_ast_expr_free(Expr);
- isl_int_clear(Int);
return V;
}
OpenPOWER on IntegriCloud