summaryrefslogtreecommitdiff
path: root/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-22 00:24:57 +0000
committerOwen Anderson <resistor@mac.com>2009-07-22 00:24:57 +0000
commite922c0201916e0b980ab3cfe91e1413e68d55647 (patch)
tree663be741b84470d97945f01da459a3627af683fd /lib/Analysis/ValueTracking.cpp
parent7cf12c7efd37dc12c3ed536a3f4c373dddac2b85 (diff)
downloadllvm-e922c0201916e0b980ab3cfe91e1413e68d55647.tar.gz
llvm-e922c0201916e0b980ab3cfe91e1413e68d55647.tar.bz2
llvm-e922c0201916e0b980ab3cfe91e1413e68d55647.tar.xz
Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r--lib/Analysis/ValueTracking.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp
index 4cca313101..b392b7ef55 100644
--- a/lib/Analysis/ValueTracking.cpp
+++ b/lib/Analysis/ValueTracking.cpp
@@ -824,7 +824,7 @@ bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) {
Value *BuildSubAggregate(Value *From, Value* To, const Type *IndexedType,
SmallVector<unsigned, 10> &Idxs,
unsigned IdxSkip,
- LLVMContext *Context,
+ LLVMContext &Context,
Instruction *InsertBefore) {
const llvm::StructType *STy = llvm::dyn_cast<llvm::StructType>(IndexedType);
if (STy) {
@@ -882,13 +882,13 @@ Value *BuildSubAggregate(Value *From, Value* To, const Type *IndexedType,
//
// All inserted insertvalue instructions are inserted before InsertBefore
Value *BuildSubAggregate(Value *From, const unsigned *idx_begin,
- const unsigned *idx_end, LLVMContext *Context,
+ const unsigned *idx_end, LLVMContext &Context,
Instruction *InsertBefore) {
assert(InsertBefore && "Must have someplace to insert!");
const Type *IndexedType = ExtractValueInst::getIndexedType(From->getType(),
idx_begin,
idx_end);
- Value *To = Context->getUndef(IndexedType);
+ Value *To = Context.getUndef(IndexedType);
SmallVector<unsigned, 10> Idxs(idx_begin, idx_end);
unsigned IdxSkip = Idxs.size();
@@ -903,7 +903,7 @@ Value *BuildSubAggregate(Value *From, const unsigned *idx_begin,
/// If InsertBefore is not null, this function will duplicate (modified)
/// insertvalues when a part of a nested struct is extracted.
Value *llvm::FindInsertedValue(Value *V, const unsigned *idx_begin,
- const unsigned *idx_end, LLVMContext *Context,
+ const unsigned *idx_end, LLVMContext &Context,
Instruction *InsertBefore) {
// Nothing to index? Just return V then (this is useful at the end of our
// recursion)
@@ -917,11 +917,11 @@ Value *llvm::FindInsertedValue(Value *V, const unsigned *idx_begin,
const CompositeType *PTy = cast<CompositeType>(V->getType());
if (isa<UndefValue>(V))
- return Context->getUndef(ExtractValueInst::getIndexedType(PTy,
+ return Context.getUndef(ExtractValueInst::getIndexedType(PTy,
idx_begin,
idx_end));
else if (isa<ConstantAggregateZero>(V))
- return Context->getNullValue(ExtractValueInst::getIndexedType(PTy,
+ return Context.getNullValue(ExtractValueInst::getIndexedType(PTy,
idx_begin,
idx_end));
else if (Constant *C = dyn_cast<Constant>(V)) {