From 6b0cf67ae72a9ebb90e94cc9a14e09364a2b3466 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 7 Jun 2010 23:19:17 +0000 Subject: Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105574 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CodeGenAction.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/Frontend/CodeGenAction.cpp') diff --git a/lib/Frontend/CodeGenAction.cpp b/lib/Frontend/CodeGenAction.cpp index c9c5048afc..c0dc75bafb 100644 --- a/lib/Frontend/CodeGenAction.cpp +++ b/lib/Frontend/CodeGenAction.cpp @@ -56,7 +56,6 @@ namespace { Diagnostic &Diags; BackendAction Action; const CodeGenOptions &CodeGenOpts; - const LangOptions &LangOpts; const TargetOptions &TargetOpts; llvm::raw_ostream *AsmOutStream; llvm::formatted_raw_ostream FormattedOutStream; @@ -89,14 +88,13 @@ namespace { public: BackendConsumer(BackendAction action, Diagnostic &_Diags, - const LangOptions &langopts, const CodeGenOptions &compopts, + const CodeGenOptions &compopts, const TargetOptions &targetopts, bool TimePasses, const std::string &infile, llvm::raw_ostream *OS, LLVMContext &C) : Diags(_Diags), Action(action), CodeGenOpts(compopts), - LangOpts(langopts), TargetOpts(targetopts), AsmOutStream(OS), LLVMIRGeneration("LLVM IR Generation Time"), @@ -394,7 +392,7 @@ void BackendConsumer::CreatePasses() { llvm::createStandardModulePasses(PM, OptLevel, CodeGenOpts.OptimizeSize, CodeGenOpts.UnitAtATime, CodeGenOpts.UnrollLoops, - /*SimplifyLibCalls=*/!LangOpts.NoBuiltin, + CodeGenOpts.SimplifyLibCalls, /*HaveExceptions=*/true, InliningPass); } @@ -566,7 +564,7 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, if (BA != Backend_EmitNothing && !OS) return 0; - return new BackendConsumer(BA, CI.getDiagnostics(), CI.getLangOpts(), + return new BackendConsumer(BA, CI.getDiagnostics(), CI.getCodeGenOpts(), CI.getTargetOpts(), CI.getFrontendOpts().ShowTimers, InFile, OS.take(), CI.getLLVMContext()); -- cgit v1.2.3-70-g09d2