diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2017-06-28 15:06:34 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2017-06-28 15:06:34 +0000 |
commit | afdadf56275bf870a4b54d6ca104937be7b708e6 (patch) | |
tree | 26ff4116afa0880db08cd35c9b700e463f4f3d89 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 9a450d9b2903ac89ce57e54777b6046415e1f8e7 (diff) | |
download | llvm-afdadf56275bf870a4b54d6ca104937be7b708e6.zip llvm-afdadf56275bf870a4b54d6ca104937be7b708e6.tar.gz llvm-afdadf56275bf870a4b54d6ca104937be7b708e6.tar.bz2 |
Use vfs::FileSystem in ASTUnit when creating CompilerInvocation.
Summary: It used to always call into the RealFileSystem before.
Reviewers: bkramer, krasimir, klimek, bruno
Reviewed By: klimek
Subscribers: bruno, cfe-commits
Differential Revision: https://reviews.llvm.org/D34469
llvm-svn: 306549
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r-- | clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp index 49d459e..c3ce7ce 100644 --- a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -31,8 +31,8 @@ using namespace llvm::opt; /// \return A CompilerInvocation, or 0 if none was built for the given /// argument vector. std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine( - ArrayRef<const char *> ArgList, - IntrusiveRefCntPtr<DiagnosticsEngine> Diags) { + ArrayRef<const char *> ArgList, IntrusiveRefCntPtr<DiagnosticsEngine> Diags, + IntrusiveRefCntPtr<vfs::FileSystem> VFS) { if (!Diags.get()) { // No diagnostics engine was provided, so create our own diagnostics object // with the default options. @@ -46,7 +46,7 @@ std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine( // FIXME: We shouldn't have to pass in the path info. driver::Driver TheDriver(Args[0], llvm::sys::getDefaultTargetTriple(), - *Diags); + *Diags, VFS); // Don't check that inputs exist, they may have been remapped. TheDriver.setCheckInputsExist(false); |