[llvm-commits] CVS: llvm/lib/Transforms/Utils/LowerInvoke.cpp

Chris Lattner sabre at nondot.org
Mon Feb 12 14:57:02 PST 2007



Changes in directory llvm/lib/Transforms/Utils:

LowerInvoke.cpp updated: 1.52 -> 1.53
---
Log message:

stop using methods that take vectors.


---
Diffs of the changes:  (+4 -3)

 LowerInvoke.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.52 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.53
--- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.52	Sat Feb 10 19:37:51 2007
+++ llvm/lib/Transforms/Utils/LowerInvoke.cpp	Mon Feb 12 16:56:41 2007
@@ -441,7 +441,7 @@
     std::vector<Value*> Idx;
     Idx.push_back(Constant::getNullValue(Type::Int32Ty));
     Idx.push_back(ConstantInt::get(Type::Int32Ty, 1));
-    OldJmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "OldBuf",
+    OldJmpBufPtr = new GetElementPtrInst(JmpBuf, &Idx[0], 2, "OldBuf",
                                          EntryBB->getTerminator());
 
     // Copy the JBListHead to the alloca.
@@ -480,7 +480,8 @@
                                                      "setjmp.cont");
 
     Idx[1] = ConstantInt::get(Type::Int32Ty, 0);
-    Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "TheJmpBuf",
+    Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, &Idx[0], Idx.size(),
+                                             "TheJmpBuf",
                                              EntryBB->getTerminator());
     Value *SJRet = new CallInst(SetJmpFn, JmpBufPtr, "sjret",
                                 EntryBB->getTerminator());
@@ -530,7 +531,7 @@
   std::vector<Value*> Idx;
   Idx.push_back(Constant::getNullValue(Type::Int32Ty));
   Idx.push_back(ConstantInt::get(Type::Int32Ty, 0));
-  Idx[0] = new GetElementPtrInst(BufPtr, Idx, "JmpBuf", UnwindBlock);
+  Idx[0] = new GetElementPtrInst(BufPtr, &Idx[0], 2, "JmpBuf", UnwindBlock);
   Idx[1] = ConstantInt::get(Type::Int32Ty, 1);
   new CallInst(LongJmpFn, Idx, "", UnwindBlock);
   new UnreachableInst(UnwindBlock);






More information about the llvm-commits mailing list