diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-15 22:58:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-15 22:58:25 +0000 |
commit | d2536a604f59a3cca491f175bf1e49eeca49163b (patch) | |
tree | 0030af96483fedda86d5fcdae114f4bddf75f6b0 /lib/Frontend/CompilerInstance.cpp | |
parent | 3bc451593fa44bfc45753e44e37cb4242e714f82 (diff) |
Revert r144703. It was a dumb idea anyway; will add the new bits more
incrementally with a new frontend action.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 0a32cb96f7..ea2c3bd6c6 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -647,14 +647,13 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { llvm::EnableStatistics(); for (unsigned i = 0, e = getFrontendOpts().Inputs.size(); i != e; ++i) { - InputKind InKind = getFrontendOpts().Inputs[i].first; - std::string InFile = getFrontendOpts().Inputs[i].second; - + const 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, InKind)) { + if (Act.BeginSourceFile(*this, InFile, getFrontendOpts().Inputs[i].first)) { Act.Execute(); Act.EndSourceFile(); } @@ -699,7 +698,7 @@ static InputKind getSourceInputKindFromOptions(const LangOptions &LangOpts) { namespace { struct CompileModuleData { CompilerInstance &Instance; - GenerateModuleAction &CreateModuleAction; + GeneratePCHAction &CreateModuleAction; }; } @@ -1024,7 +1023,7 @@ static void compileModule(CompilerInstance &ImportingInstance, /*ShouldCloneClient=*/true); // Construct a module-generating action. - GenerateModuleAction CreateModuleAction; + GeneratePCHAction CreateModuleAction(true); // Execute the action to actually build the module in-place. Use a separate // thread so that we get a stack large enough. |