]> granicus.if.org Git - clang/commitdiff
Driver: Translate -fverbose-asm for LLVM backend.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 24 Mar 2009 17:59:06 +0000 (17:59 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 24 Mar 2009 17:59:06 +0000 (17:59 +0000)
 - <rdar://problem/6715707> driver should translate -fverbose-asm into
   -asm-verbose

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

include/clang/Driver/Options.def
lib/Driver/Tools.cpp
test/Driver/clang-translation.c

index 7b527427e929a8db912f35439344d3d3c50da58e..e8f156ae91b87dacb3e83e1baf1675cad7b463d5 100644 (file)
@@ -413,6 +413,7 @@ OPTION("-fterminated-vtables", fterminated_vtables, Flag, f_Group, INVALID, "",
 OPTION("-ftime-report", ftime_report, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-ftraditional", ftraditional, Flag, f_Group, INVALID, "", 0)
 OPTION("-funwind-tables", funwind_tables, Flag, f_Group, INVALID, "", 0)
+OPTION("-fverbose-asm", fverbose_asm, Flag, f_Group, INVALID, "", 0)
 OPTION("-fwritable-strings", fwritable_strings, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-fzero-initialized-in-bss", fzero_initialized_in_bss, Flag, f_Group, INVALID, "", 0)
 OPTION("-f", f, Joined, f_Group, INVALID, "", 0)
index 15c0fc998de0940eb0bb9aa4242a992f38d9b578..bc5a7cf860cee1485e19acb7b881a6e04598ea1a 100644 (file)
@@ -120,7 +120,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                       options::OPT_fno_zero_initialized_in_bss,
                       true))
       CmdArgs.push_back("--nozero-initialized-in-bss");
-    if (Args.hasArg(options::OPT_dA))
+    if (Args.hasArg(options::OPT_dA) || Args.hasArg(options::OPT_fverbose_asm))
       CmdArgs.push_back("--asm-verbose");
     if (Args.hasArg(options::OPT_fdebug_pass_structure))
       CmdArgs.push_back("--debug-pass=Structure");
index eac05943ebe8dcafac5d6bd6aafd7acc7b89372e..b63a4379da197a87befa6fbd3567a164d5c74cf7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s 2> %t.log
+// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm 2> %t.log
 // RUN: grep '"-S"' %t.log &&
 // RUN: grep '"-disable-free"' %t.log &&
 // RUN: grep '"--relocation-model" "static"' %t.log &&
@@ -8,4 +8,5 @@
 // RUN: grep '"-Os"' %t.log &&
 // RUN: grep '"-arch" "i386"' %t.log &&
 // RUN: grep '"-o" .*clang-translation\.c\.out\.tmp\.s' %t.log &&
+// RUN: grep '"--asm-verbose"' %t.log &&
 // RUN: true