summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-05 01:30:19 +0000
committerChris Lattner <sabre@nondot.org>2004-04-05 01:30:19 +0000
commit69193f93b689d3cc03ec9e685d662003d06134ea (patch)
treeed36e2aa107383c32cc79bfb71deb1547afed277 /llvm/lib/Transforms/Scalar/LowerInvoke.cpp
parentfd9fbe187d9d4143f07f575f0722f185ab0ce945 (diff)
downloadbcm5719-llvm-69193f93b689d3cc03ec9e685d662003d06134ea.tar.gz
bcm5719-llvm-69193f93b689d3cc03ec9e685d662003d06134ea.zip
Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into sequential types. llvm-svn: 12653
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LowerInvoke.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LowerInvoke.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp b/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
index 2349d7638d6..c486633a75a 100644
--- a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
@@ -277,14 +277,14 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
// Store this old value as our 'next' field, and store our alloca as the
// current jblist.
std::vector<Value*> Idx;
- Idx.push_back(Constant::getNullValue(Type::LongTy));
- Idx.push_back(ConstantUInt::get(Type::UByteTy, 0));
+ Idx.push_back(Constant::getNullValue(Type::IntTy));
+ Idx.push_back(ConstantUInt::get(Type::UIntTy, 0));
Value *NextFieldPtr = new GetElementPtrInst(JmpBuf, Idx, "NextField", II);
new StoreInst(OldEntry, NextFieldPtr, II);
new StoreInst(JmpBuf, JBListHead, II);
// Call setjmp, passing in the address of the jmpbuffer.
- Idx[1] = ConstantUInt::get(Type::UByteTy, 1);
+ Idx[1] = ConstantUInt::get(Type::UIntTy, 1);
Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "TheJmpBuf", II);
Value *SJRet = new CallInst(SetJmpFn, JmpBufPtr, "sjret", II);
@@ -369,14 +369,14 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
// JBList.
std::vector<Value*> Idx;
Idx.push_back(Constant::getNullValue(Type::LongTy));
- Idx.push_back(ConstantUInt::get(Type::UByteTy, 0));
+ Idx.push_back(ConstantUInt::get(Type::UIntTy, 0));
Value *NextFieldPtr = new GetElementPtrInst(RecPtr, Idx, "NextField", RI);
Value *NextRec = new LoadInst(NextFieldPtr, "NextRecord", RI);
new StoreInst(NextRec, JBListHead, RI);
// Now that we popped the top of the JBList, get a pointer to the jmpbuf and
// longjmp.
- Idx[1] = ConstantUInt::get(Type::UByteTy, 1);
+ Idx[1] = ConstantUInt::get(Type::UIntTy, 1);
Idx[0] = new GetElementPtrInst(RecPtr, Idx, "JmpBuf", RI);
Idx[1] = ConstantInt::get(Type::IntTy, 1);
new CallInst(LongJmpFn, Idx, "", RI);
OpenPOWER on IntegriCloud