r201312 - XCore target pass -v flag to assembler & linker

Robert Lytton robert at xmos.com
Thu Feb 13 02:40:13 PST 2014


Author: rlytton
Date: Thu Feb 13 04:40:12 2014
New Revision: 201312

URL: http://llvm.org/viewvc/llvm-project?rev=201312&view=rev
Log:
XCore target pass -v flag to assembler & linker

Modified:
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/Driver/xcore-opts.c

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=201312&r1=201311&r2=201312&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Feb 13 04:40:12 2014
@@ -7279,9 +7279,12 @@ void XCore::Assemble::ConstructJob(Compi
 
   CmdArgs.push_back("-c");
 
-  if (Args.hasArg(options::OPT_g_Group)) {
+  if (Args.hasArg(options::OPT_v))
+    CmdArgs.push_back("-v");
+
+  if (Args.hasArg(options::OPT_g_Group))
     CmdArgs.push_back("-g");
-  }
+
   if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm,
                    false))
     CmdArgs.push_back("-fverbose-asm");
@@ -7314,6 +7317,9 @@ void XCore::Link::ConstructJob(Compilati
     assert(Output.isNothing() && "Invalid output.");
   }
 
+  if (Args.hasArg(options::OPT_v))
+    CmdArgs.push_back("-v");
+
   ExceptionSettings EH = exceptionSettings(Args, getToolChain().getTriple());
   if (EH.ShouldUseExceptionTables)
     CmdArgs.push_back("-fexceptions");

Modified: cfe/trunk/test/Driver/xcore-opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/xcore-opts.c?rev=201312&r1=201311&r2=201312&view=diff
==============================================================================
--- cfe/trunk/test/Driver/xcore-opts.c (original)
+++ cfe/trunk/test/Driver/xcore-opts.c Thu Feb 13 04:40:12 2014
@@ -1,5 +1,5 @@
-// RUN: %clang -target xcore %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -fverbose-asm -### -o %t.o 2>&1 | FileCheck %s
-// RUN: %clang -target xcore -x c++ %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -fverbose-asm -### -o %t.o 2>&1 | FileCheck %s
+// RUN: %clang -target xcore %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -fverbose-asm -v -### -o %t.o 2>&1 | FileCheck %s
+// RUN: %clang -target xcore -x c++ %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -fverbose-asm -v -### -o %t.o 2>&1 | FileCheck %s
 // RUN: %clang -target xcore -x c++ %s -fexceptions -### -o %t.o 2>&1 | FileCheck -check-prefix CHECK-EXCEP %s
 
 // CHECK: "-nostdsysteminc"
@@ -12,9 +12,10 @@
 // CHECK: "-fno-common"
 // CHECH: xcc" "-o"
 // CHECK-EXCEP-NOT: "-fexceptions"
-// CHECK: "-c" "-g" "-fverbose-asm" "A1Arg" "A2Arg"
+// CHECK: "-c" "-v" "-g" "-fverbose-asm" "A1Arg" "A2Arg"
 // CHECK: xcc" "-o"
 // CHECK-EXCEP-NOT: "-fexceptions"
+// CHECK: "-v"
 // CHECK: "L1Arg" "L2Arg"
 
 // CHECK-EXCEP: "-fno-use-cxa-atexit"





More information about the cfe-commits mailing list