Commit 74984064 authored by Loo Rong Jie's avatar Loo Rong Jie Committed by Commit Bot

Concat help strings and print in one go

Compilers don't flatten os << const char* for you. Save a bit binary size.

Bug:NO

Change-Id: Iabe0de83fdf6394f223d0423e63bd5aadf1453b3
Reviewed-on: https://chromium-review.googlesource.com/503829Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Loo Rong Jie <loorongjie@gmail.com>
Cr-Commit-Position: refs/heads/master@{#45272}
parent eb18a514
......@@ -575,18 +575,19 @@ void FlagList::PrintHelp() {
OFStream os(stdout);
os << "Usage:\n"
<< " shell [options] -e string\n"
<< " execute string in V8\n"
<< " shell [options] file1 file2 ... filek\n"
<< " run JavaScript scripts in file1, file2, ..., filek\n"
<< " shell [options]\n"
<< " shell [options] --shell [file1 file2 ... filek]\n"
<< " run an interactive JavaScript shell\n"
<< " d8 [options] file1 file2 ... filek\n"
<< " d8 [options]\n"
<< " d8 [options] --shell [file1 file2 ... filek]\n"
<< " run the new debugging shell\n\n"
<< "Options:\n";
" shell [options] -e string\n"
" execute string in V8\n"
" shell [options] file1 file2 ... filek\n"
" run JavaScript scripts in file1, file2, ..., filek\n"
" shell [options]\n"
" shell [options] --shell [file1 file2 ... filek]\n"
" run an interactive JavaScript shell\n"
" d8 [options] file1 file2 ... filek\n"
" d8 [options]\n"
" d8 [options] --shell [file1 file2 ... filek]\n"
" run the new debugging shell\n\n"
"Options:\n";
for (size_t i = 0; i < num_flags; ++i) {
Flag* f = &flags[i];
os << " --" << f->name() << " (" << f->comment() << ")\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment