[PATCH] D33020: [Myriad] Pass -Xclang and -mllvm flags to moviCompile

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 15:01:27 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL302738: [Myriad] Pass -Xclang and -mllvm flags to moviCompile (authored by jyknight).

Changed prior to commit:
  https://reviews.llvm.org/D33020?vs=98369&id=98538#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33020

Files:
  cfe/trunk/lib/Driver/ToolChains/Myriad.cpp
  cfe/trunk/test/Driver/myriad-toolchain.c


Index: cfe/trunk/test/Driver/myriad-toolchain.c
===================================================================
--- cfe/trunk/test/Driver/myriad-toolchain.c
+++ cfe/trunk/test/Driver/myriad-toolchain.c
@@ -54,9 +54,11 @@
 // -fno-split-dwarf-inlining is consumed but not passed to moviCompile.
 // RUN: %clang -target shave-myriad -c -### %s -g -fno-inline-functions \
 // RUN: -fno-inline-functions-called-once -Os -Wall -MF dep.d -fno-split-dwarf-inlining \
-// RUN: -ffunction-sections 2>&1 | FileCheck %s -check-prefix=PASSTHRU_OPTIONS
+// RUN: -ffunction-sections -Xclang -xclangflag -mllvm -llvm-flag 2>&1 \
+// RUN:   | FileCheck %s -check-prefix=PASSTHRU_OPTIONS
 // PASSTHRU_OPTIONS: "-g" "-fno-inline-functions" "-fno-inline-functions-called-once"
 // PASSTHRU_OPTIONS: "-Os" "-Wall" "-MF" "dep.d" "-ffunction-sections"
+// PASSTHRU_OPTIONS: "-Xclang" "-xclangflag" "-mllvm" "-llvm-flag"
 
 // RUN: %clang -target shave-myriad -c %s -o foo.o -### -MD -MF dep.d 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=MDMF
Index: cfe/trunk/lib/Driver/ToolChains/Myriad.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Myriad.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Myriad.cpp
@@ -43,15 +43,17 @@
   }
   CmdArgs.push_back("-DMYRIAD2");
 
-  // Append all -I, -iquote, -isystem paths, defines/undefines,
-  // 'f' flags, optimize flags, and warning options.
+  // Append all -I, -iquote, -isystem paths, defines/undefines, 'f'
+  // flags, 'g' flags, 'M' flags, optimize flags, warning options,
+  // mcpu flags, mllvm flags, and Xclang flags.
   // These are spelled the same way in clang and moviCompile.
   Args.AddAllArgsExcept(
       CmdArgs,
       {options::OPT_I_Group, options::OPT_clang_i_Group, options::OPT_std_EQ,
        options::OPT_D, options::OPT_U, options::OPT_f_Group,
        options::OPT_f_clang_Group, options::OPT_g_Group, options::OPT_M_Group,
-       options::OPT_O_Group, options::OPT_W_Group, options::OPT_mcpu_EQ},
+       options::OPT_O_Group, options::OPT_W_Group, options::OPT_mcpu_EQ,
+       options::OPT_mllvm, options::OPT_Xclang},
       {options::OPT_fno_split_dwarf_inlining});
   Args.hasArg(options::OPT_fno_split_dwarf_inlining); // Claim it if present.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33020.98538.patch
Type: text/x-patch
Size: 2261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170510/5d98f237/attachment-0001.bin>


More information about the cfe-commits mailing list