13#ifndef LLVM_CLANG_INSTALLAPI_HEADERFILE_H
14#define LLVM_CLANG_INSTALLAPI_HEADERFILE_H
19#include "llvm/ADT/StringRef.h"
20#include "llvm/Support/ErrorHandling.h"
21#include "llvm/Support/Regex.h"
49 llvm_unreachable(
"unexpected header type");
58 std::string IncludeName;
60 std::optional<clang::Language>
Language;
71 StringRef IncludeName = StringRef(),
72 std::optional<clang::Language>
Language = std::nullopt)
73 : FullPath(FullPath),
Type(
Type), IncludeName(IncludeName),
80 StringRef
getPath()
const {
return FullPath; }
94 return std::tie(
Type, FullPath, IncludeName,
Language, Excluded, Extra,
95 Umbrella) == std::tie(
Other.Type,
Other.FullPath,
105 std::string GlobString;
108 bool FoundMatch{
false};
125 StringRef
str() {
return GlobString; }
150 StringRef Directory);
Defines the clang::FileManager interface and associated types.
Implements support for file system lookup, file system caching, and directory search management.
The base class of the type hierarchy.
Representations of a library's headers for InstallAPI.
llvm::Expected< PathSeq > enumerateFiles(clang::FileManager &FM, StringRef Directory)
Given input directory, collect all header files.
std::vector< HeaderFile > HeaderSeq
@ Public
Represents declarations accessible to all clients.
@ Private
Represents declarations accessible to a disclosed set of clients.
@ Unknown
Unset or unknown type.
@ Project
Represents declarations only accessible as implementation details to the input library.
std::optional< std::string > createIncludeHeaderName(const StringRef FullPath)
Assemble expected way header will be included by clients.
StringRef getName(const HeaderType T)
bool isHeaderFile(StringRef Path)
Determine if Path is a header file.
Language
The language for the input, used to select and validate the language standard and possible actions.
const FunctionProtoType * T
@ Other
Other implicit parameter.