summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-18 20:39:29 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-18 20:39:29 +0000
commit293534b1a50f7489f6d6e2c24aeccc8e7db88c05 (patch)
treedc32e59f7a8de096b84d1202bbc73093e1747083 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parent35b0eaf23d5fe90ad9a04f76488c212cb6f31210 (diff)
downloadbcm5719-llvm-293534b1a50f7489f6d6e2c24aeccc8e7db88c05.tar.gz
bcm5719-llvm-293534b1a50f7489f6d6e2c24aeccc8e7db88c05.zip
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
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r--clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index 526c0c71de5..3611d9aa86f 100644
--- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -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());
OpenPOWER on IntegriCloud