[llvm-commits] CVS: gcc-3.4/gcc/llvm-expand.c

Chris Lattner lattner at cs.uiuc.edu
Sun Mar 7 21:34:01 PST 2004


Changes in directory gcc-3.4/gcc:

llvm-expand.c updated: 1.18 -> 1.19

---
Log message:

Remove a use of Pmode.  We want to depend on RTL state as little as possible
in the C front-end


---
Diffs of the changes:  (+3 -4)

Index: gcc-3.4/gcc/llvm-expand.c
diff -u gcc-3.4/gcc/llvm-expand.c:1.18 gcc-3.4/gcc/llvm-expand.c:1.19
--- gcc-3.4/gcc/llvm-expand.c:1.18	Sun Mar  7 20:13:21 2004
+++ gcc-3.4/gcc/llvm-expand.c	Sun Mar  7 21:32:59 2004
@@ -5086,10 +5086,9 @@
        */
       llvm_value *Op0 = llvm_expand_expr(Fn, TREE_OPERAND(exp, 0), 0);
       llvm_value *Op1 = llvm_expand_expr(Fn, TREE_OPERAND(exp, 1), 0);
-      if (Pmode == SImode)
-      {
-        Op1 = cast_if_type_not_equal(Fn, Op1, IntTy);
-      }
+      llvm_type *IntPtrTy =
+        llvm_type_get_integer(llvm_type_get_size(VoidPtrTy), 0);
+      Op1 = cast_if_type_not_equal(Fn, Op1, IntPtrTy);
       Op1 = cast_if_type_not_equal(Fn, Op1, LongTy);
       /* FIXME: What do we do about bitfields here??? */
       





More information about the llvm-commits mailing list