From 611ba3ea3300b71eb95dc4e45f20eee5dddd32e1 Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Sun, 17 Jul 2011 15:40:56 +0000
Subject: Vendor import of clang trunk r135360:
 http://llvm.org/svn/llvm-project/cfe/trunk@135360

---
 lib/CodeGen/CodeGenAction.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'lib/CodeGen/CodeGenAction.cpp')

diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp
index 62fa1f9..263e01e 100644
--- a/lib/CodeGen/CodeGenAction.cpp
+++ b/lib/CodeGen/CodeGenAction.cpp
@@ -34,6 +34,7 @@ namespace clang {
     BackendAction Action;
     const CodeGenOptions &CodeGenOpts;
     const TargetOptions &TargetOpts;
+    const LangOptions &LangOpts;
     llvm::raw_ostream *AsmOutStream;
     ASTContext *Context;
 
@@ -46,13 +47,16 @@ namespace clang {
   public:
     BackendConsumer(BackendAction action, Diagnostic &_Diags,
                     const CodeGenOptions &compopts,
-                    const TargetOptions &targetopts, bool TimePasses,
+                    const TargetOptions &targetopts,
+                    const LangOptions &langopts,
+                    bool TimePasses,
                     const std::string &infile, llvm::raw_ostream *OS,
                     LLVMContext &C) :
       Diags(_Diags),
       Action(action),
       CodeGenOpts(compopts),
       TargetOpts(targetopts),
+      LangOpts(langopts),
       AsmOutStream(OS),
       LLVMIRGeneration("LLVM IR Generation Time"),
       Gen(CreateLLVMCodeGen(Diags, infile, compopts, C)) {
@@ -126,7 +130,7 @@ namespace clang {
       void *OldContext = Ctx.getInlineAsmDiagnosticContext();
       Ctx.setInlineAsmDiagnosticHandler(InlineAsmDiagHandler, this);
 
-      EmitBackendOutput(Diags, CodeGenOpts, TargetOpts,
+      EmitBackendOutput(Diags, CodeGenOpts, TargetOpts, LangOpts,
                         TheModule.get(), Action, AsmOutStream);
       
       Ctx.setInlineAsmDiagnosticHandler(OldHandler, OldContext);
@@ -285,6 +289,7 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI,
   BEConsumer = 
       new BackendConsumer(BA, CI.getDiagnostics(),
                           CI.getCodeGenOpts(), CI.getTargetOpts(),
+                          CI.getLangOpts(),
                           CI.getFrontendOpts().ShowTimers, InFile, OS.take(),
                           *VMContext);
   return BEConsumer;
@@ -332,7 +337,8 @@ void CodeGenAction::ExecuteAction() {
     }
 
     EmitBackendOutput(CI.getDiagnostics(), CI.getCodeGenOpts(),
-                      CI.getTargetOpts(), TheModule.get(),
+                      CI.getTargetOpts(), CI.getLangOpts(),
+                      TheModule.get(),
                       BA, OS);
     return;
   }
-- 
cgit v1.1