summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-12-09 21:21:07 +0000
committerJustin Bogner <mail@justinbogner.com>2015-12-09 21:21:07 +0000
commitb7389d6714f8f4e46a28b90aa4a103f0586a08ab (patch)
tree27f218758cfc34dd1ba5c5969cb58f048b416d3d /llvm/lib/IR/Constants.cpp
parentdb51357c113ac1e65d22ac5e4199f0a7857b88bf (diff)
downloadbcm5719-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.cpp2
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);
}
OpenPOWER on IntegriCloud