aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-02-12 21:45:14 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-02-12 21:45:14 +0000
commitcf4611b4c5e0861c07a62d9e32b41143f0934c3b (patch)
treef64e71a77f5618887330da5cad741be7a5cf7644
parent5a9a60b604282258d8f437a58e934c7a26414668 (diff)
downloadclang-cf4611b4c5e0861c07a62d9e32b41143f0934c3b.tar.gz
Make ModuleDependencyCollector's method virtual (NFC)
For reproducers in LLDB we want to hook up into the existing clang infrastructure. To make that happen we need to be able to override the ModuleDependencyCollector's methods. The alternative was to inherit from the DependencyCollector directly, but that would mean re-implementing the ModuleDependencyListener and the ModuleDependencyPPCallbacks and ModuleDependencyMMCallbacks. Differential revision: https://reviews.llvm.org/D58072 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353882 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Frontend/Utils.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Frontend/Utils.h b/include/clang/Frontend/Utils.h
index 58c5a39a88..124d4a9933 100644
--- a/include/clang/Frontend/Utils.h
+++ b/include/clang/Frontend/Utils.h
@@ -145,18 +145,18 @@ public:
~ModuleDependencyCollector() override { writeFileMap(); }
StringRef getDest() { return DestDir; }
- bool insertSeen(StringRef Filename) { return Seen.insert(Filename).second; }
- void addFile(StringRef Filename, StringRef FileDst = {});
+ virtual bool insertSeen(StringRef Filename) { return Seen.insert(Filename).second; }
+ virtual void addFile(StringRef Filename, StringRef FileDst = {});
- void addFileMapping(StringRef VPath, StringRef RPath) {
+ virtual void addFileMapping(StringRef VPath, StringRef RPath) {
VFSWriter.addFileMapping(VPath, RPath);
}
void attachToPreprocessor(Preprocessor &PP) override;
void attachToASTReader(ASTReader &R) override;
- void writeFileMap();
- bool hasErrors() { return HasErrors; }
+ virtual void writeFileMap();
+ virtual bool hasErrors() { return HasErrors; }
};
/// AttachDependencyGraphGen - Create a dependency graph generator, and attach