diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-12-09 21:21:07 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-12-09 21:21:07 +0000 |
commit | b7389d6714f8f4e46a28b90aa4a103f0586a08ab (patch) | |
tree | 27f218758cfc34dd1ba5c5969cb58f048b416d3d /llvm/lib/IR/Constants.cpp | |
parent | db51357c113ac1e65d22ac5e4199f0a7857b88bf (diff) | |
download | bcm5719-llvm-b7389d6714f8f4e46a28b90aa4a103f0586a08ab.tar.gz bcm5719-llvm-b7389d6714f8f4e46a28b90aa4a103f0586a08ab.zip |
IR: Make ConstantDataArray::getFP actually return a ConstantDataArray
The ConstantDataArray::getFP(LLVMContext &, ArrayRef<uint16_t>)
overload has had a typo in it since it was written, where it will
create a Vector instead of an Array. This obviously doesn't work at
all, but it turns out that until r254991 there weren't actually any
callers of this overload. Fix the typo and add some test coverage.
llvm-svn: 255157
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index 509783fff8b..36282c16429 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -2523,7 +2523,7 @@ Constant *ConstantDataArray::get(LLVMContext &Context, ArrayRef<double> Elts) { /// object. Constant *ConstantDataArray::getFP(LLVMContext &Context, ArrayRef<uint16_t> Elts) { - Type *Ty = VectorType::get(Type::getHalfTy(Context), Elts.size()); + Type *Ty = ArrayType::get(Type::getHalfTy(Context), Elts.size()); const char *Data = reinterpret_cast<const char *>(Elts.data()); return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 2), Ty); } |