[cfe-commits] r139837 - /cfe/trunk/lib/Frontend/CompilerInstance.cpp
Douglas Gregor
dgregor at apple.com
Thu Sep 15 13:53:28 PDT 2011
Author: dgregor
Date: Thu Sep 15 15:53:28 2011
New Revision: 139837
URL: http://llvm.org/viewvc/llvm-project?rev=139837&view=rev
Log:
Comment what's going on when we compile a module
Modified:
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=139837&r1=139836&r2=139837&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Thu Sep 15 15:53:28 2011
@@ -658,10 +658,18 @@
// 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;
More information about the cfe-commits
mailing list