aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-24 17:59:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-24 17:59:06 +0000
commitb3fd500a1c486e9fb82d82e28828ead025462aeb (patch)
treedaa90b515410d8cc0ff1b228e50eb5232a0a8194
parenta43a21ef141fd2e814f4936ff0291a8306e00b97 (diff)
Driver: Translate -fverbose-asm for LLVM backend.
- <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
-rw-r--r--include/clang/Driver/Options.def1
-rw-r--r--lib/Driver/Tools.cpp2
-rw-r--r--test/Driver/clang-translation.c3
3 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def
index 7b527427e9..e8f156ae91 100644
--- a/include/clang/Driver/Options.def
+++ b/include/clang/Driver/Options.def
@@ -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)
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 15c0fc998d..bc5a7cf860 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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");
diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c
index eac05943eb..b63a4379da 100644
--- a/test/Driver/clang-translation.c
+++ b/test/Driver/clang-translation.c
@@ -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