diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-15 21:49:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-15 21:49:36 +0000 |
commit | 86b6f742171d94cc23e9773429ed9cc33dde4857 (patch) | |
tree | 3d480aa138f8d81a0c91faf64d45d6acd7dec0ea /clang/lib/Frontend/CompilerInstance.cpp | |
parent | b4db660cff42462e3b312eb27923cbe670cc746e (diff) | |
download | bcm5719-llvm-86b6f742171d94cc23e9773429ed9cc33dde4857.tar.gz bcm5719-llvm-86b6f742171d94cc23e9773429ed9cc33dde4857.zip |
Split GenerateModuleAction into its own action, which will start
differing from GeneratePCHAction fairly soon.
llvm-svn: 144703
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index ea2c3bd6c6b..0a32cb96f70 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -647,13 +647,14 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { llvm::EnableStatistics(); for (unsigned i = 0, e = getFrontendOpts().Inputs.size(); i != e; ++i) { - const std::string &InFile = getFrontendOpts().Inputs[i].second; - + InputKind InKind = getFrontendOpts().Inputs[i].first; + std::string InFile = getFrontendOpts().Inputs[i].second; + // Reset the ID tables if we are reusing the SourceManager. if (hasSourceManager()) getSourceManager().clearIDTables(); - if (Act.BeginSourceFile(*this, InFile, getFrontendOpts().Inputs[i].first)) { + if (Act.BeginSourceFile(*this, InFile, InKind)) { Act.Execute(); Act.EndSourceFile(); } @@ -698,7 +699,7 @@ static InputKind getSourceInputKindFromOptions(const LangOptions &LangOpts) { namespace { struct CompileModuleData { CompilerInstance &Instance; - GeneratePCHAction &CreateModuleAction; + GenerateModuleAction &CreateModuleAction; }; } @@ -1023,7 +1024,7 @@ static void compileModule(CompilerInstance &ImportingInstance, /*ShouldCloneClient=*/true); // Construct a module-generating action. - GeneratePCHAction CreateModuleAction(true); + GenerateModuleAction CreateModuleAction; // Execute the action to actually build the module in-place. Use a separate // thread so that we get a stack large enough. |