diff options
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r-- | clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp index 638757a..d0b855f 100644 --- a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -22,6 +22,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Option/ArgList.h" +#include "llvm/Support/VirtualFileSystem.h" #include "llvm/TargetParser/Host.h" using namespace clang; using namespace llvm::opt; @@ -32,7 +33,9 @@ clang::createInvocation(ArrayRef<const char *> ArgList, assert(!ArgList.empty()); auto Diags = Opts.Diags ? std::move(Opts.Diags) - : CompilerInstance::createDiagnostics(new DiagnosticOptions); + : CompilerInstance::createDiagnostics( + Opts.VFS ? *Opts.VFS : *llvm::vfs::getRealFileSystem(), + new DiagnosticOptions); SmallVector<const char *, 16> Args(ArgList); |