aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-15 00:14:00 +0000
committerChris Lattner <sabre@nondot.org>2011-02-15 00:14:00 +0000
commit69229316aa1f22837619451d8bbecd6a82714967 (patch)
tree6c8c27fb012f28b3693bf652e56254ed0c372784 /llvm/lib/Analysis/ConstantFolding.cpp
parent84b2a40b4c48aef7542cdd8f54ba67e6021be557 (diff)
downloadllvm-69229316aa1f22837619451d8bbecd6a82714967.zip
llvm-69229316aa1f22837619451d8bbecd6a82714967.tar.gz
llvm-69229316aa1f22837619451d8bbecd6a82714967.tar.bz2
convert ConstantVector::get to use ArrayRef.
llvm-svn: 125537
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 95e8bde..cd8d52c 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -54,7 +54,7 @@ static Constant *FoldBitCast(Constant *C, const Type *DestTy,
// vector so the code below can handle it uniformly.
if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) {
Constant *Ops = C; // don't take the address of C!
- return FoldBitCast(ConstantVector::get(&Ops, 1), DestTy, TD);
+ return FoldBitCast(ConstantVector::get(Ops), DestTy, TD);
}
// If this is a bitcast from constant vector -> vector, fold it.
@@ -167,7 +167,7 @@ static Constant *FoldBitCast(Constant *C, const Type *DestTy,
}
}
- return ConstantVector::get(Result.data(), Result.size());
+ return ConstantVector::get(Result);
}