1 //===- Strings.h ------------------------------------------------*- C++ -*-===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/Optional.h"
15 #include "llvm/ADT/StringRef.h"
16 #include "llvm/Support/GlobPattern.h"
21 // Returns a demangled C++ symbol name. If Name is not a mangled
22 // name, it returns Optional::None.
23 llvm::Optional<std::string> demangleItanium(llvm::StringRef Name);
24 llvm::Optional<std::string> demangleMSVC(llvm::StringRef S);
26 std::vector<uint8_t> parseHex(llvm::StringRef S);
27 bool isValidCIdentifier(llvm::StringRef S);
29 // Write the contents of the a buffer to a file
30 void saveBuffer(llvm::StringRef Buffer, const llvm::Twine &Path);
32 // This class represents multiple glob patterns.
35 StringMatcher() = default;
36 explicit StringMatcher(llvm::ArrayRef<llvm::StringRef> Pat);
38 bool match(llvm::StringRef S) const;
41 std::vector<llvm::GlobPattern> Patterns;