diff clang-tools-extra/clangd/RIFF.h @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 1d019706d866
children c4bab56944e8
line wrap: on
line diff
--- a/clang-tools-extra/clangd/RIFF.h	Tue Jun 15 19:13:43 2021 +0900
+++ b/clang-tools-extra/clangd/RIFF.h	Tue Jun 15 19:15:29 2021 +0900
@@ -44,6 +44,9 @@
 inline constexpr FourCC fourCC(const char (&Literal)[5]) {
   return FourCC{{Literal[0], Literal[1], Literal[2], Literal[3]}};
 }
+inline constexpr llvm::StringRef fourCCStr(const FourCC &Data) {
+  return llvm::StringRef(&Data[0], Data.size());
+}
 // A chunk is a section in a RIFF container.
 struct Chunk {
   FourCC ID;