diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-14 07:55:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-14 07:55:32 +0000 |
commit | d9f5b885482986a9577291b7d00506ca6f5a8bd3 (patch) | |
tree | ed6690c7ebf3fa2da7744416a155cd4247dcc2b1 /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | e654a096a4dbeb1ffadecf721a989dd3b8077ad4 (diff) | |
download | llvm-d9f5b885482986a9577291b7d00506ca6f5a8bd3.zip llvm-d9f5b885482986a9577291b7d00506ca6f5a8bd3.tar.gz llvm-d9f5b885482986a9577291b7d00506ca6f5a8bd3.tar.bz2 |
Switch ConstantVector::get to use ArrayRef instead of a pointer+size
idiom. Change various clients to simplify their code.
llvm-svn: 125487
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 4 |
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); } |