summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 0baf3e5e1fb..4e04c2c0e83 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -159,7 +159,6 @@ ASTConsumer* FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
return new MultiplexConsumer(Consumers);
}
-
bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
const FrontendInputFile &Input) {
assert(!Instance && "Already processing a source file!");
@@ -213,6 +212,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
}
// Set up the file and source managers, if needed.
+ if (!CI.hasVirtualFileSystem())
+ CI.createVirtualFileSystem();
if (!CI.hasFileManager())
CI.createFileManager();
if (!CI.hasSourceManager())
OpenPOWER on IntegriCloud