[PATCH] XCore target pass -v flag to assembler & linker
robert lytton
robert at xmos.com
Tue Feb 4 04:49:12 PST 2014
http://llvm-reviews.chandlerc.com/D2685
Files:
lib/Driver/Tools.cpp
test/Driver/xcore-opts.c
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -7178,9 +7178,12 @@
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");
@@ -7213,6 +7216,9 @@
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");
Index: test/Driver/xcore-opts.c
===================================================================
--- test/Driver/xcore-opts.c
+++ test/Driver/xcore-opts.c
@@ -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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2685.1.patch
Type: text/x-patch
Size: 1994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140204/f3078ee7/attachment.bin>
More information about the cfe-commits
mailing list