clang-tools 8.0.0

Public Types | Public Member Functions | List of all members
clang::find_all_symbols::HeaderMapCollector Class Reference

HeaderMappCollector collects all remapping header files. More...

`#include <HeaderMapCollector.h>`

## Public Types
typedef llvm::StringMap< std::string > | HeaderMap
typedef std::vector< std::pair< const char *, const char * > > | RegexHeaderMap

## Public Member Functions
| HeaderMapCollector ()=default
| HeaderMapCollector (const RegexHeaderMap *RegexHeaderMappingTable)
void | addHeaderMapping (llvm::StringRef OrignalHeaderPath, llvm::StringRef MappingHeaderPath)
llvm::StringRef | getMappedHeader (llvm::StringRef Header) const
| Check if there is a mapping from `Header` or a regex pattern that matches it to another header name. More...

## Detailed Description

HeaderMappCollector collects all remapping header files.

This maps complete header names or header name regex patterns to header names.

Definition at line 23 of file HeaderMapCollector.h.

## Member Typedef Documentation

## ◆ HeaderMap

typedef llvm::StringMap<std::string> clang::find_all_symbols::HeaderMapCollector::HeaderMap

Definition at line 25 of file HeaderMapCollector.h.

## ◆ RegexHeaderMap

typedef std::vector<std::pair<const char *, const char *> > clang::find_all_symbols::HeaderMapCollector::RegexHeaderMap

Definition at line 26 of file HeaderMapCollector.h.

## Constructor & Destructor Documentation

## ◆ HeaderMapCollector() [1/2]

clang::find_all_symbols::HeaderMapCollector::HeaderMapCollector | ( |  | ) |
| default

## ◆ HeaderMapCollector() [2/2]

clang::find_all_symbols::HeaderMapCollector::HeaderMapCollector | ( | const RegexHeaderMap * | RegexHeaderMappingTable | ) |
| explicit

Definition at line 16 of file HeaderMapCollector.cpp.

## Member Function Documentation

## ◆ addHeaderMapping()

void clang::find_all_symbols::HeaderMapCollector::addHeaderMapping | ( | llvm::StringRef | OrignalHeaderPath,
|  | llvm::StringRef | MappingHeaderPath
| ) |  |
| inline

Definition at line 31 of file HeaderMapCollector.h.

References getMappedHeader().

## ◆ getMappedHeader()

llvm::StringRef clang::find_all_symbols::HeaderMapCollector::getMappedHeader | ( | llvm::StringRef | Header | ) | const

Check if there is a mapping from `Header` or a regex pattern that matches it to another header name.

Parameters

  Header | A header name.

Returns
  `Header` itself if there is no mapping for it; otherwise, return a mapped header name.

Definition at line 27 of file HeaderMapCollector.cpp.

Referenced by addHeaderMapping().

The documentation for this class was generated from the following files:

- HeaderMapCollector.h
- HeaderMapCollector.cpp