diff options
Diffstat (limited to 'include/clang/Frontend/Utils.h')
-rw-r--r-- | include/clang/Frontend/Utils.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/clang/Frontend/Utils.h b/include/clang/Frontend/Utils.h index 74e563218c31..0f9b17ee5089 100644 --- a/include/clang/Frontend/Utils.h +++ b/include/clang/Frontend/Utils.h @@ -99,11 +99,11 @@ public: /// Return true if system files should be passed to sawDependency(). virtual bool needSystemDependencies() { return false; } - // implementation detail /// Add a dependency \p Filename if it has not been seen before and /// sawDependency() returns true. - void maybeAddDependency(StringRef Filename, bool FromModule, bool IsSystem, - bool IsModuleFile, bool IsMissing); + virtual void maybeAddDependency(StringRef Filename, bool FromModule, + bool IsSystem, bool IsModuleFile, + bool IsMissing); protected: /// Return true if the filename was added to the list of dependencies, false @@ -213,13 +213,18 @@ createChainedIncludesSource(CompilerInstance &CI, /// createInvocationFromCommandLine - Construct a compiler invocation object for /// a command line argument vector. /// +/// \param ShouldRecoverOnErrors - whether we should attempt to return a +/// non-null (and possibly incorrect) CompilerInvocation if any errors were +/// encountered. When this flag is false, always return null on errors. +/// /// \return A CompilerInvocation, or 0 if none was built for the given /// argument vector. std::unique_ptr<CompilerInvocation> createInvocationFromCommandLine( ArrayRef<const char *> Args, IntrusiveRefCntPtr<DiagnosticsEngine> Diags = IntrusiveRefCntPtr<DiagnosticsEngine>(), - IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr); + IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr, + bool ShouldRecoverOnErrors = false); /// Return the value of the last argument as an integer, or a default. If Diags /// is non-null, emits an error if the argument is given, but non-integral. |