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

Chris Lattner lattner at cs.uiuc.edu
Tue Mar 9 20:52:01 PST 2004


Changes in directory gcc-3.4/gcc:

llvm-representation.c updated: 1.4 -> 1.5
llvm-representation.h updated: 1.1 -> 1.2

---
Log message:

Rename and expose function


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

Index: gcc-3.4/gcc/llvm-representation.c
diff -u gcc-3.4/gcc/llvm-representation.c:1.4 gcc-3.4/gcc/llvm-representation.c:1.5
--- gcc-3.4/gcc/llvm-representation.c:1.4	Sat Feb 14 21:10:29 2004
+++ gcc-3.4/gcc/llvm-representation.c	Tue Mar  9 20:50:57 2004
@@ -431,7 +431,7 @@
   llvm_constant_aggregate_print(CA, stderr);
 }
 
-static int isNullConstant(llvm_value *V) {
+int llvm_is_null_constant(llvm_value *V) {
   switch (V->VTy) {
   case ConstantAggregate: {
     llvm_constant_aggregate *CA = (llvm_constant_aggregate*)V;
@@ -443,7 +443,7 @@
       e = V->Ty->x.Array.Size;
     }
     for (i = 0; i != e; ++i)
-      if (!isNullConstant(CA->Initializers[i])) return 0;
+      if (!llvm_is_null_constant(CA->Initializers[i])) return 0;
     return 1;
   }
   default: return 0;
@@ -459,7 +459,7 @@
   llvm_type *Ty = G2V(CE)->Ty;
   llvm_value **Elements = CE->Initializers;
 
-  if (isNullConstant((llvm_value*)CE)) {
+  if (llvm_is_null_constant((llvm_value*)CE)) {
     fprintf(F, "zeroinitializer");
     return;
   }


Index: gcc-3.4/gcc/llvm-representation.h
diff -u gcc-3.4/gcc/llvm-representation.h:1.1 gcc-3.4/gcc/llvm-representation.h:1.2
--- gcc-3.4/gcc/llvm-representation.h:1.1	Thu Jan  8 16:35:32 2004
+++ gcc-3.4/gcc/llvm-representation.h	Tue Mar  9 20:50:57 2004
@@ -87,6 +87,7 @@
 llvm_value *llvm_constant_new(struct llvm_type *Ty, const char *Rep);
 llvm_value *llvm_constant_new_integral(struct llvm_type *Ty, long long X);
 llvm_value *llvm_constant_get_null(struct llvm_type *Ty);
+int llvm_is_null_constant(llvm_value *V);
 void llvm_constant_construct(llvm_constant *C, struct llvm_type *Ty,
                              const char *Name, enum ValueType VT,
                              const char *Rep);





More information about the llvm-commits mailing list