summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-12 20:34:47 +0000
committerChris Lattner <sabre@nondot.org>2002-09-12 20:34:47 +0000
commit59afbf3999ebcbb5cc2bb4c8592f550b70fb0a3c (patch)
tree56d126e7804193b60b1b85b900117c36efe6c7b0 /lib
parent597f81fea26716ea024072bc154395d773b08567 (diff)
downloadexternal_llvm-59afbf3999ebcbb5cc2bb4c8592f550b70fb0a3c.zip
external_llvm-59afbf3999ebcbb5cc2bb4c8592f550b70fb0a3c.tar.gz
external_llvm-59afbf3999ebcbb5cc2bb4c8592f550b70fb0a3c.tar.bz2
Fix a bug introduced by the Getelementptr change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/CBackend/CBackend.cpp2
-rw-r--r--lib/Target/CBackend/Writer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index bc3829f..c54af08 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -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();
}
}
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index bc3829f..c54af08 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -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();
}
}