diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-11 01:21:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-11 01:21:29 +0000 |
commit | 106ff4551c9c35bb6bcbdd6ca50543b100a7658e (patch) | |
tree | ecc29951a8648a0ca42426f152de89d8d6127539 /lib/Target/CBackend/CBackend.cpp | |
parent | 562219de55f007b0dbd3aeffad888e530a8faad4 (diff) |
- Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 941af03af2..bc3829f67c 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -916,7 +916,7 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I, } for (; I != E; ++I) - if ((*I)->getType() == Type::UIntTy) { + if ((*I)->getType() == Type::LongTy) { Out << "[((int) ("; // sign-extend from 32 (to 64) bits writeOperand(*I); Out << " * sizeof("; @@ -925,7 +925,7 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I, printType(cast<PointerType>(Ptr->getType())->getElementType()); Out << ")]"; } else { - Out << ".field" << cast<ConstantUInt>(*I)->getValue(); + Out << ".field" << cast<ConstantSInt>(*I)->getValue(); } } |