diff options
author | Fangrui Song <maskray@google.com> | 2019-04-07 03:58:42 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-07 03:58:42 +0000 |
commit | 6a0746a92f0764f7af1968c84b141ccbe752919c (patch) | |
tree | 0ee2b9c51b91d60ec561bc3a6ba11e7a8937c29c /llvm/lib/IR/Constants.cpp | |
parent | fca07890a9918e9814a7c3d6a39ea3a91789b546 (diff) | |
download | llvm-6a0746a92f0764f7af1968c84b141ccbe752919c.zip llvm-6a0746a92f0764f7af1968c84b141ccbe752919c.tar.gz llvm-6a0746a92f0764f7af1968c84b141ccbe752919c.tar.bz2 |
Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef()
llvm-svn: 357852
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 a161992..00c7226 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())); } |