Fix a bug introduced by the Getelementptr change
authorChris Lattner <sabre@nondot.org>
Thu, 12 Sep 2002 20:34:47 +0000 (20:34 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 12 Sep 2002 20:34:47 +0000 (20:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3695 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index bc3829f67cdbf5e8276a5f46233111e61754e37d..c54af08e8442130e99a1bd988a0fc9ea97336a3c 100644 (file)
@@ -925,7 +925,7 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
       printType(cast<PointerType>(Ptr->getType())->getElementType());
       Out << ")]";
     } else {
-      Out << ".field" << cast<ConstantSInt>(*I)->getValue();
+      Out << ".field" << cast<ConstantUInt>(*I)->getValue();
     }
 }
 
index bc3829f67cdbf5e8276a5f46233111e61754e37d..c54af08e8442130e99a1bd988a0fc9ea97336a3c 100644 (file)
@@ -925,7 +925,7 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
       printType(cast<PointerType>(Ptr->getType())->getElementType());
       Out << ")]";
     } else {
-      Out << ".field" << cast<ConstantSInt>(*I)->getValue();
+      Out << ".field" << cast<ConstantUInt>(*I)->getValue();
     }
 }