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 | 6137d32c1b3e3cef750b32ac780d6a669a7b27cb (patch) | |
| tree | 2dd0a0495683a615ce5d2b6241e9239f662f5820 /clang/lib/Frontend | |
| parent | c2ff27446dc7f7399ada50b073ebfd423f2fb35d (diff) | |
| download | bcm5719-llvm-6137d32c1b3e3cef750b32ac780d6a669a7b27cb.tar.gz bcm5719-llvm-6137d32c1b3e3cef750b32ac780d6a669a7b27cb.zip | |
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
llvm-svn: 139824
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 9087ab58d6e..07d438b556a 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/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. |

