1 //===- Strings.h ------------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 #include "llvm/ADT/ArrayRef.h"
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/GlobPattern.h"
20 // Returns a demangled C++ symbol name. If Name is not a mangled
21 // name, it returns name.
22 std::string demangleItanium(llvm::StringRef name);
24 std::vector<uint8_t> parseHex(llvm::StringRef s);
25 bool isValidCIdentifier(llvm::StringRef s);
27 // Write the contents of the a buffer to a file
28 void saveBuffer(llvm::StringRef buffer, const llvm::Twine &path);
30 // This class represents multiple glob patterns.
33 StringMatcher() = default;
34 explicit StringMatcher(llvm::ArrayRef<llvm::StringRef> pat);
36 bool match(llvm::StringRef s) const;
39 std::vector<llvm::GlobPattern> patterns;