[llvm-commits] [124085] adjust to new ConstantExpr API.

clattner at apple.com clattner at apple.com
Mon Feb 19 11:51:57 PST 2007


Revision: 124085
Author:   clattner
Date:     2007-02-19 11:51:56 -0800 (Mon, 19 Feb 2007)

Log Message:
-----------
adjust to new ConstantExpr API.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp	2007-02-19 08:46:45 UTC (rev 124084)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp	2007-02-19 19:51:56 UTC (rev 124085)
@@ -5345,7 +5345,7 @@
   if (TREE_CODE (TREE_TYPE(Array)) == ARRAY_TYPE)
     Idx.push_back(ConstantInt::get(Type::Int32Ty, 0));
   Idx.push_back(IndexVal);
-  return ConstantExpr::getGetElementPtr(ArrayAddr, Idx);
+  return ConstantExpr::getGetElementPtr(ArrayAddr, &Idx[0], Idx.size());
 }
 
 Constant *TreeConstantToLLVM::EmitLV_COMPONENT_REF(tree exp) {
@@ -5378,7 +5378,8 @@
       std::vector<Value*> Idxs;
       Idxs.push_back(Constant::getNullValue(Type::Int32Ty));
       Idxs.push_back(CI);
-      FieldPtr = ConstantExpr::getGetElementPtr(StructAddrLV, Idxs);
+      FieldPtr = ConstantExpr::getGetElementPtr(StructAddrLV, &Idxs[0], 
+                                                Idxs.size());
       
       // Now that we did an offset from the start of the struct, subtract off
       // the offset from BitStart.





More information about the llvm-commits mailing list