summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-24 22:00:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-24 22:00:03 +0000
commit480093f4440d54b30b3025afeac24b48f2ba7a2e (patch)
tree162e72994062888647caf0d875428db9445491a8 /contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp
parent489b1cf2ecf5b9b4a394857987014bfb09067726 (diff)
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp b/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp
index b3b7976f8f3e..934d17b3c925 100644
--- a/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp
+++ b/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp
@@ -10,6 +10,7 @@
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclGroup.h"
+#include "clang/Basic/Builtins.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/CompilerInstance.h"
@@ -870,9 +871,9 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
// extended by an external source.
if (CI.getLangOpts().Modules || !CI.hasASTContext() ||
!CI.getASTContext().getExternalSource()) {
- CI.createModuleManager();
- CI.getModuleManager()->setDeserializationListener(DeserialListener,
- DeleteDeserialListener);
+ CI.createASTReader();
+ CI.getASTReader()->setDeserializationListener(DeserialListener,
+ DeleteDeserialListener);
}
}
@@ -891,7 +892,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
} else {
// FIXME: If this is a problem, recover from it by creating a multiplex
// source.
- assert((!CI.getLangOpts().Modules || CI.getModuleManager()) &&
+ assert((!CI.getLangOpts().Modules || CI.getASTReader()) &&
"modules enabled but created an external source that "
"doesn't support modules");
}