diff options
Diffstat (limited to 'clang/lib/Frontend/DependencyFile.cpp')
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 4bb0167bd5976..c9240f4122a7b 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -137,16 +137,17 @@ struct DepCollectorASTListener : public ASTReaderListener { }; } // end anonymous namespace -void DependencyCollector::maybeAddDependency(StringRef Filename, bool FromModule, - bool IsSystem, bool IsModuleFile, - bool IsMissing) { +void DependencyCollector::maybeAddDependency(StringRef Filename, + bool FromModule, bool IsSystem, + bool IsModuleFile, + bool IsMissing) { if (sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing)) addDependency(Filename); } bool DependencyCollector::addDependency(StringRef Filename) { if (Seen.insert(Filename).second) { - Dependencies.push_back(Filename); + Dependencies.push_back(std::string(Filename)); return true; } return false; @@ -160,8 +161,8 @@ static bool isSpecialFilename(StringRef Filename) { } bool DependencyCollector::sawDependency(StringRef Filename, bool FromModule, - bool IsSystem, bool IsModuleFile, - bool IsMissing) { + bool IsSystem, bool IsModuleFile, + bool IsMissing) { return !isSpecialFilename(Filename) && (needSystemDependencies() || !IsSystem); } |