From a39924a1f8b97a2b65765f31d7e87884541d52ec Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 24 Feb 2015 05:14:17 +0000 Subject: Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309 --- clang/lib/Frontend/FrontendActions.cpp | 40 ++++------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) (limited to 'clang/lib/Frontend/FrontendActions.cpp') diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 3e0f525e653..a55a3257851 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -10,13 +10,10 @@ #include "clang/Frontend/FrontendActions.h" #include "clang/AST/ASTConsumer.h" #include "clang/Basic/FileManager.h" -#include "clang/Basic/TargetInfo.h" -#include "clang/CodeGen/CodeGenModuleContainer.h" #include "clang/Frontend/ASTConsumers.h" #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendDiagnostic.h" -#include "clang/Frontend/MultiplexConsumer.h" #include "clang/Frontend/Utils.h" #include "clang/Lex/HeaderSearch.h" #include "clang/Lex/Pragma.h" @@ -88,23 +85,8 @@ GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { if (!CI.getFrontendOpts().RelocatablePCH) Sysroot.clear(); - - std::vector> Consumers; - Consumers.push_back(llvm::make_unique(CI.getPreprocessor(), - OutputFile, nullptr, - Sysroot)); - - auto CGOpts = CI.getCodeGenOpts(); - // The debug info emitted by ModuleContainerGenerator is not affected by the - // optimization level. - CGOpts.OptimizationLevel = 0; - CGOpts.setDebugInfo(CodeGenOptions::LimitedDebugInfo); - Consumers.push_back(std::unique_ptr( - CreateModuleContainerGenerator(CI.getDiagnostics(), "PCH", CGOpts, - CI.getTargetOpts(), CI.getLangOpts(), OS, - cast(Consumers[0].get())))); - - return llvm::make_unique(std::move(Consumers)); + return llvm::make_unique(CI.getPreprocessor(), OutputFile, + nullptr, Sysroot, OS); } bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, @@ -140,22 +122,8 @@ GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI, if (ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, OS)) return nullptr; - std::vector> Consumers; - Consumers.push_back(llvm::make_unique(CI.getPreprocessor(), - OutputFile, Module, - Sysroot)); - - auto CGOpts = CI.getCodeGenOpts(); - // The debug info emitted by ModuleContainerGenerator is not affected by the - // optimization level. - CGOpts.OptimizationLevel = 0; - CGOpts.setDebugInfo(CodeGenOptions::LimitedDebugInfo); - Consumers.push_back( - std::unique_ptr(CreateModuleContainerGenerator( - CI.getDiagnostics(), Module->getFullModuleName(), CGOpts, - CI.getTargetOpts(), CI.getLangOpts(), OS, - cast(Consumers[0].get())))); - return llvm::make_unique(std::move(Consumers)); + return llvm::make_unique(CI.getPreprocessor(), OutputFile, + Module, Sysroot, OS); } static SmallVectorImpl & -- cgit v1.2.3