Add a factory method to ConstantDataArray that allows to pass in the data as StringRef
authorAdrian Kuegel <akuegel@google.com>
Tue, 19 Jun 2018 08:12:28 +0000 (08:12 +0000)
committerAdrian Kuegel <akuegel@google.com>
Tue, 19 Jun 2018 08:12:28 +0000 (08:12 +0000)
commit17a07d8a61ed042590613b199252fbdaf858bcca
treeb09ef9d78bff5da5e5069c2b89f0ff42e161ebff
parentd8fcf0de3110042a715c482aba523fa61ddfebb2
Add a factory method to ConstantDataArray that allows to pass in the data as StringRef

This simplifies the case if we already have access to the raw data that we need to store in a ConstantDataArray.
The new factor method can also be reused for implementing the factory method that gets the data as ArrayRef.

Differential Revision: https://reviews.llvm.org/D47706

llvm-svn: 335028
llvm/include/llvm/IR/Constants.h