|
9 | 9 | // except according to those terms.
|
10 | 10 |
|
11 | 11 | use back::abi;
|
12 |
| -use lib::llvm::{llvm, SetLinkage, PrivateLinkage, ValueRef, TypeRef, Bool, True, False}; |
| 12 | +use lib::llvm::{llvm, ConstFCmp, ConstICmp, SetLinkage, PrivateLinkage, ValueRef, TypeRef, Bool, |
| 13 | + True, False}; |
13 | 14 | use lib::llvm::{IntEQ, IntNE, IntUGT, IntUGE, IntULT, IntULE, IntSGT, IntSGE, IntSLT, IntSLE,
|
14 | 15 | RealOEQ, RealOGT, RealOGE, RealOLT, RealOLE, RealONE};
|
15 | 16 |
|
@@ -293,39 +294,39 @@ fn const_expr_unadjusted(cx: @CrateContext, e: @ast::expr) -> ValueRef {
|
293 | 294 | else { llvm::LLVMConstLShr(te1, te2) }
|
294 | 295 | }
|
295 | 296 | ast::eq => {
|
296 |
| - if is_float { llvm::LLVMConstFCmp(RealOEQ, te1, te2) } |
297 |
| - else { llvm::LLVMConstICmp(IntEQ, te1, te2) } |
| 297 | + if is_float { ConstFCmp(RealOEQ, te1, te2) } |
| 298 | + else { ConstICmp(IntEQ, te1, te2) } |
298 | 299 | },
|
299 | 300 | ast::lt => {
|
300 |
| - if is_float { llvm::LLVMConstFCmp(RealOLT, te1, te2) } |
| 301 | + if is_float { ConstFCmp(RealOLT, te1, te2) } |
301 | 302 | else {
|
302 |
| - if signed { llvm::LLVMConstICmp(IntSLT, te1, te2) } |
303 |
| - else { llvm::LLVMConstICmp(IntULT, te1, te2) } |
| 303 | + if signed { ConstICmp(IntSLT, te1, te2) } |
| 304 | + else { ConstICmp(IntULT, te1, te2) } |
304 | 305 | }
|
305 | 306 | },
|
306 | 307 | ast::le => {
|
307 |
| - if is_float { llvm::LLVMConstFCmp(RealOLE, te1, te2) } |
| 308 | + if is_float { ConstFCmp(RealOLE, te1, te2) } |
308 | 309 | else {
|
309 |
| - if signed { llvm::LLVMConstICmp(IntSLE, te1, te2) } |
310 |
| - else { llvm::LLVMConstICmp(IntULE, te1, te2) } |
| 310 | + if signed { ConstICmp(IntSLE, te1, te2) } |
| 311 | + else { ConstICmp(IntULE, te1, te2) } |
311 | 312 | }
|
312 | 313 | },
|
313 | 314 | ast::ne => {
|
314 |
| - if is_float { llvm::LLVMConstFCmp(RealONE, te1, te2) } |
315 |
| - else { llvm::LLVMConstICmp(IntNE, te1, te2) } |
| 315 | + if is_float { ConstFCmp(RealONE, te1, te2) } |
| 316 | + else { ConstICmp(IntNE, te1, te2) } |
316 | 317 | },
|
317 | 318 | ast::ge => {
|
318 |
| - if is_float { llvm::LLVMConstFCmp(RealOGE, te1, te2) } |
| 319 | + if is_float { ConstFCmp(RealOGE, te1, te2) } |
319 | 320 | else {
|
320 |
| - if signed { llvm::LLVMConstICmp(IntSGE, te1, te2) } |
321 |
| - else { llvm::LLVMConstICmp(IntUGE, te1, te2) } |
| 321 | + if signed { ConstICmp(IntSGE, te1, te2) } |
| 322 | + else { ConstICmp(IntUGE, te1, te2) } |
322 | 323 | }
|
323 | 324 | },
|
324 | 325 | ast::gt => {
|
325 |
| - if is_float { llvm::LLVMConstFCmp(RealOGT, te1, te2) } |
| 326 | + if is_float { ConstFCmp(RealOGT, te1, te2) } |
326 | 327 | else {
|
327 |
| - if signed { llvm::LLVMConstICmp(IntSGT, te1, te2) } |
328 |
| - else { llvm::LLVMConstICmp(IntUGT, te1, te2) } |
| 328 | + if signed { ConstICmp(IntSGT, te1, te2) } |
| 329 | + else { ConstICmp(IntUGT, te1, te2) } |
329 | 330 | }
|
330 | 331 | },
|
331 | 332 | };
|
|
0 commit comments