Initialize the AST consumer as soon as we have both an ASTConsumer and an
ASTContext. Fixes some cases where we could previously initialize the AST consumer more than once. llvm-svn: 245346
This commit is contained in:
@@ -71,10 +71,7 @@ public:
|
||||
virtual ~PCHContainerGenerator() {}
|
||||
|
||||
void Initialize(ASTContext &Context) override {
|
||||
if (Ctx) {
|
||||
assert(Ctx == &Context);
|
||||
return;
|
||||
}
|
||||
assert(!Ctx && "initialized multiple times");
|
||||
|
||||
Ctx = &Context;
|
||||
VMContext.reset(new llvm::LLVMContext());
|
||||
|
||||
Reference in New Issue
Block a user