[llvm-commits] CVS: llvm-gcc/gcc/llvm-types.c
Chris Lattner
lattner at cs.uiuc.edu
Sun Jul 18 14:18:13 PDT 2004
Changes in directory llvm-gcc/gcc:
llvm-types.c updated: 1.10 -> 1.11
---
Log message:
robustify code and unbreak llvmgcc build on several targets
---
Diffs of the changes: (+1 -7)
Index: llvm-gcc/gcc/llvm-types.c
diff -u llvm-gcc/gcc/llvm-types.c:1.10 llvm-gcc/gcc/llvm-types.c:1.11
--- llvm-gcc/gcc/llvm-types.c:1.10 Tue Jul 6 22:13:44 2004
+++ llvm-gcc/gcc/llvm-types.c Sun Jul 18 16:18:03 2004
@@ -60,13 +60,7 @@
case ArrayTyID: return llvm_type_get_size(Ty->Elements[0])*Ty->x.Array.Size;
case StructTyID: return Ty->x.Struct.Size;
case PointerTyID: /* Target dependant pointer size */
- switch (ptr_mode) {
- case SImode: case PSImode: return 4;
- case DImode: case PDImode: return 8;
- default:
- assert(0 && "Unknown mode for pointer type!");
- }
- return (TREE_INT_CST_LOW(TYPE_SIZE(ptr_type_node))+7)/8;
+ return POINTER_SIZE/BITS_PER_UNIT;
default:
fprintf(stderr, "ERROR: Type doesn't have size: ");
llvm_type_dump(Ty);
More information about the llvm-commits
mailing list