[llvm-commits] CVS: llvm-gcc/gcc/llvm-representation.h llvm-representation.c

Chris Lattner lattner at cs.uiuc.edu
Tue Jul 6 22:21:02 PDT 2004


Changes in directory llvm-gcc/gcc:

llvm-representation.h updated: 1.8 -> 1.9
llvm-representation.c updated: 1.8 -> 1.9

---
Log message:

Add a new intptr_0 constant


---
Diffs of the changes:  (+7 -0)

Index: llvm-gcc/gcc/llvm-representation.h
diff -u llvm-gcc/gcc/llvm-representation.h:1.8 llvm-gcc/gcc/llvm-representation.h:1.9
--- llvm-gcc/gcc/llvm-representation.h:1.8	Tue Jul  6 22:13:44 2004
+++ llvm-gcc/gcc/llvm-representation.h	Tue Jul  6 22:19:52 2004
@@ -104,6 +104,7 @@
 extern llvm_value *llvm_constant_int_0;
 extern llvm_value *llvm_constant_uint_0;
 extern llvm_value *llvm_constant_long_0;
+extern llvm_value *llvm_constant_intptr_0;
 extern llvm_value *llvm_constant_bool_true;
 extern llvm_value *llvm_constant_bool_false;
 


Index: llvm-gcc/gcc/llvm-representation.c
diff -u llvm-gcc/gcc/llvm-representation.c:1.8 llvm-gcc/gcc/llvm-representation.c:1.9
--- llvm-gcc/gcc/llvm-representation.c:1.8	Fri May  7 13:32:35 2004
+++ llvm-gcc/gcc/llvm-representation.c	Tue Jul  6 22:19:52 2004
@@ -312,6 +312,7 @@
 llvm_value *llvm_constant_long_0;
 llvm_value *llvm_constant_int_0;
 llvm_value *llvm_constant_uint_0;
+llvm_value *llvm_constant_intptr_0;
 llvm_value *llvm_constant_VoidPtr_null;
 llvm_value *llvm_constant_bool_true;
 llvm_value *llvm_constant_bool_false;
@@ -325,6 +326,11 @@
   llvm_constant_uint_0       = llvm_constant_new(UIntTy,    "0");
   llvm_constant_uint_1       = llvm_constant_new(UIntTy,    "1");
   llvm_constant_VoidPtr_null = llvm_constant_new(VoidPtrTy, "null");
+
+  if (llvm_type_get_size(llvm_constant_VoidPtr_null->Ty) == 8)
+    llvm_constant_intptr_0 = llvm_constant_long_0;
+  else
+    llvm_constant_intptr_0 = llvm_constant_int_0;
 }
 
 llvm_value *llvm_constant_get_null(llvm_type *Ty) {





More information about the llvm-commits mailing list