diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-15 18:47:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-15 18:47:32 +0000 |
commit | 1a995ddaa53a20dcd063ea47eb1f533ecb0d243a (patch) | |
tree | 654baf1ea7e0c1c8f279d46431af84b4d47c6edd /lib/Frontend/CompilerInstance.cpp | |
parent | 7d7ef8298d4711206772ff9eb51f5140536cbeab (diff) |
When we load the first module, make sure that we wire up the ASTConsumer to the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 9087ab58d6..07d438b556 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -756,6 +756,8 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, getASTContext().setExternalSource(Source); if (hasSema()) ModuleManager->InitializeSema(getSema()); + if (hasASTConsumer()) + ModuleManager->StartTranslationUnit(&getASTConsumer()); } // Try to load the module we found. |