[llvm-commits] CVS: llvm-gcc/gcc/llvm-representation.c
Chris Lattner
lattner at cs.uiuc.edu
Tue Jul 6 23:20:01 PDT 2004
Changes in directory llvm-gcc/gcc:
llvm-representation.c updated: 1.9 -> 1.10
---
Log message:
Fix a buggy assertion, thanks to Markus for his infinite patience with me :)
---
Diffs of the changes: (+3 -1)
Index: llvm-gcc/gcc/llvm-representation.c
diff -u llvm-gcc/gcc/llvm-representation.c:1.9 llvm-gcc/gcc/llvm-representation.c:1.10
--- llvm-gcc/gcc/llvm-representation.c:1.9 Tue Jul 6 22:19:52 2004
+++ llvm-gcc/gcc/llvm-representation.c Tue Jul 6 23:19:38 2004
@@ -594,7 +594,9 @@
llvm_instruction *create_gep3(llvm_value *Op0, llvm_value *Op1,llvm_value *Op2){
llvm_instruction *I;
llvm_type *ResultTy = GET_POINTER_TYPE_ELEMENT(Op0->Ty);
- assert(Op1->Ty == LongTy && "First GEP index must be long type!");
+ assert((Op1->Ty == LongTy || Op1->Ty == IntTy ||
+ Op1->Ty == ULongTy || Op1->Ty == UIntTy) &&
+ "First GEP index must be long type!");
assert(llvm_type_is_composite(ResultTy) && "Cannot index into noncomposite!");
assert(((ResultTy->ID == ArrayTyID &&
(Op2->Ty == LongTy || Op2->Ty == ULongTy ||
More information about the llvm-commits
mailing list