]> granicus.if.org Git - clang/commitdiff
[cc1as] Add MCTargetOptions argument to createAsmBackend
authorJoel Jones <joelkevinjones@gmail.com>
Mon, 25 Jul 2016 17:18:44 +0000 (17:18 +0000)
committerJoel Jones <joelkevinjones@gmail.com>
Mon, 25 Jul 2016 17:18:44 +0000 (17:18 +0000)
Allow an assembler backend to get ABI options. This is to match the changes
to http://reviews.llvm.org/D16213.

Tested with "make check-clang"

Patch by: Joel Jones

Differential Revision: https://reviews.llvm.org/D16538

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276655 91177308-0d34-0410-b5e6-96231b3b80d8

tools/driver/cc1as_main.cpp

index 2d17be99e2d57b5203e163fc6d893ba5ad6f14c4..6b818a94d56c89a015bdc6943fa40e3f241ad520 100644 (file)
@@ -379,7 +379,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
     MCAsmBackend *MAB = nullptr;
     if (Opts.ShowEncoding) {
       CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
-      MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, Opts.CPU);
+      MCTargetOptions Options;
+      MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, Opts.CPU, Options);
     }
     auto FOut = llvm::make_unique<formatted_raw_ostream>(*Out);
     Str.reset(TheTarget->createAsmStreamer(
@@ -396,8 +397,9 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
     }
 
     MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
+    MCTargetOptions Options;
     MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple,
-                                                      Opts.CPU);
+                                                      Opts.CPU, Options);
     Triple T(Opts.Triple);
     Str.reset(TheTarget->createMCObjectStreamer(
         T, Ctx, *MAB, *Out, CE, *STI, Opts.RelaxAll,