diff options
Diffstat (limited to 'include/llvm/ObjectYAML/YAML.h')
-rw-r--r-- | include/llvm/ObjectYAML/YAML.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/llvm/ObjectYAML/YAML.h b/include/llvm/ObjectYAML/YAML.h index 163cd8dfcf08..37014109a615 100644 --- a/include/llvm/ObjectYAML/YAML.h +++ b/include/llvm/ObjectYAML/YAML.h @@ -1,9 +1,8 @@ //===- YAML.h ---------------------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -74,8 +73,7 @@ class BinaryRef { public: BinaryRef() = default; BinaryRef(ArrayRef<uint8_t> Data) : Data(Data), DataIsHexString(false) {} - BinaryRef(StringRef Data) - : Data(reinterpret_cast<const uint8_t *>(Data.data()), Data.size()) {} + BinaryRef(StringRef Data) : Data(arrayRefFromStringRef(Data)) {} /// The number of bytes that are represented by this BinaryRef. /// This is the number of bytes that writeAsBinary() will write. |