Revert 80959. It isn't sufficient to solve the full problem. And it

introduced regressions in the Ocaml bindings tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-09-03 23:34:49 +00:00
parent b405bbe664
commit 6e7ad95868
9 changed files with 92 additions and 22 deletions

View File

@@ -122,7 +122,9 @@ static Constant *FoldBitCast(LLVMContext &Context,
}
if (ElTy == DPTy->getElementType())
return ConstantExpr::getGetElementPtr(V, &IdxList[0], IdxList.size());
// This GEP is inbounds because all indices are zero.
return ConstantExpr::getInBoundsGetElementPtr(V, &IdxList[0],
IdxList.size());
}
// Handle casts from one vector constant to another. We know that the src