summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
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 a1619921f8b..00c722651ed 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2576,7 +2576,7 @@ Constant *ConstantDataArray::getFP(LLVMContext &Context,
Constant *ConstantDataArray::getString(LLVMContext &Context,
StringRef Str, bool AddNull) {
if (!AddNull) {
- const uint8_t *Data = reinterpret_cast<const uint8_t *>(Str.data());
+ const uint8_t *Data = Str.bytes_begin();
return get(Context, makeArrayRef(Data, Str.size()));
}
OpenPOWER on IntegriCloud