forked from OSchip/llvm-project
parent
e3b1f5d22c
commit
228b130a4b
|
@ -87,11 +87,15 @@ collectIWYUHeaderMaps(CanonicalIncludes *Includes) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void addSystemHeadersMapping(CanonicalIncludes *Includes) {
|
void addSystemHeadersMapping(CanonicalIncludes *Includes) {
|
||||||
|
static const std::vector<std::pair<const char *, const char *>> SymbolMap = {
|
||||||
#define SYMBOL(Name, NameSpace, Header) { #NameSpace#Name, #Header },
|
#define SYMBOL(Name, NameSpace, Header) { #NameSpace#Name, #Header },
|
||||||
#include "StdSymbolMap.inc"
|
#include "StdSymbolMap.inc"
|
||||||
#undef SYMBOL
|
#undef SYMBOL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
for (const auto &Pair : SymbolMap)
|
||||||
|
Includes->addSymbolMapping(Pair.first, Pair.second);
|
||||||
|
|
||||||
// FIXME: remove the std header mapping once we support ambiguous symbols, now
|
// FIXME: remove the std header mapping once we support ambiguous symbols, now
|
||||||
// it serves as a fallback to disambiguate:
|
// it serves as a fallback to disambiguate:
|
||||||
// - symbols with mulitiple headers (e.g. std::move)
|
// - symbols with mulitiple headers (e.g. std::move)
|
||||||
|
|
Loading…
Reference in New Issue