diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-15 20:53:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-15 20:53:28 +0000 |
commit | 44bf68d8193704c7da3fcbcc7a4ec4ee082414c6 (patch) | |
tree | 70299405c14472bcd654d60646bd046adaccdd02 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 2602ca67e89b9b9f309ef3b2b4181d65b67acb0f (diff) | |
download | bcm5719-llvm-44bf68d8193704c7da3fcbcc7a4ec4ee082414c6.tar.gz bcm5719-llvm-44bf68d8193704c7da3fcbcc7a4ec4ee082414c6.zip |
Comment what's going on when we compile a module
llvm-svn: 139837
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index e3689c0c52a..c56cc3d9db4 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -658,10 +658,18 @@ static void compileModule(CompilerInstance &ImportingInstance, // Construct a compiler invocation for creating this module. llvm::IntrusiveRefCntPtr<CompilerInvocation> Invocation (new CompilerInvocation(ImportingInstance.getInvocation())); + + // For any options that aren't intended to affect how a module is built, + // reset them to their default values. Invocation->getLangOpts().resetNonModularOptions(); Invocation->getPreprocessorOpts().resetNonModularOptions(); + + // Note that this module is part of the module build path, so that we + // can detect cycles in the module graph. Invocation->getPreprocessorOpts().ModuleBuildPath.push_back(ModuleName); + // Set up the inputs/outputs so that we build the module from its umbrella + // header. FrontendOptions &FrontendOpts = Invocation->getFrontendOpts(); FrontendOpts.OutputFile = ModuleFileName.str(); FrontendOpts.DisableFree = false; |