forked from OSchip/llvm-project
[CrashReproducer] Change module map callback signature. NFC
Use a StringRef instead of a FileEntry in the moduleMapAddHeader callback to allow more flexibility on what to collect on further patches. This changes the interface I introduced in r264971. llvm-svn: 268819
This commit is contained in:
parent
35723644c2
commit
f08417904d
|
@ -54,7 +54,7 @@ public:
|
|||
/// \brief Called when a header is added during module map parsing.
|
||||
///
|
||||
/// \param File The header file itself.
|
||||
virtual void moduleMapAddHeader(const FileEntry &File) {}
|
||||
virtual void moduleMapAddHeader(StringRef Filename) {}
|
||||
};
|
||||
|
||||
class ModuleMap {
|
||||
|
|
|
@ -44,8 +44,7 @@ struct ModuleDependencyMMCallbacks : public ModuleMapCallbacks {
|
|||
ModuleDependencyMMCallbacks(ModuleDependencyCollector &Collector)
|
||||
: Collector(Collector) {}
|
||||
|
||||
void moduleMapAddHeader(const FileEntry &File) override {
|
||||
StringRef HeaderPath = File.getName();
|
||||
void moduleMapAddHeader(StringRef HeaderPath) override {
|
||||
if (llvm::sys::path::is_absolute(HeaderPath))
|
||||
Collector.addFile(HeaderPath);
|
||||
}
|
||||
|
|
|
@ -809,7 +809,7 @@ void ModuleMap::addHeader(Module *Mod, Module::Header Header,
|
|||
|
||||
// Notify callbacks that we just added a new header.
|
||||
for (const auto &Cb : Callbacks)
|
||||
Cb->moduleMapAddHeader(*Header.Entry);
|
||||
Cb->moduleMapAddHeader(Header.Entry->getName());
|
||||
}
|
||||
|
||||
void ModuleMap::excludeHeader(Module *Mod, Module::Header Header) {
|
||||
|
|
Loading…
Reference in New Issue