[PATCH] Fix program name in "clang -help"

Sumanth Gundapaneni sgundapa at codeaurora.org
Fri Feb 27 11:53:14 PST 2015


Hi rengolin,

With out this patch,
"clang -help" prints "USAGE: clang-3 [options] <inputs>".
It should either print
 USAGE: clang [options] <inputs>
or
  USAGE: clang-3.7 [options] <inputs>
    
With this patch, on Linux, it prints
USAGE: clang-3.7 [options] <inputs>
    
On Windows, it prints
USAGE: clang.exe [options] <inputs>

http://reviews.llvm.org/D7952

Files:
  lib/Driver/Driver.cpp

Index: lib/Driver/Driver.cpp
===================================================================
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -57,7 +57,7 @@
       CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true),
       CCCUsePCH(true), SuppressMissingInputWarning(false) {
 
-  Name = llvm::sys::path::stem(ClangExecutable);
+  Name = llvm::sys::path::filename(ClangExecutable);
   Dir  = llvm::sys::path::parent_path(ClangExecutable);
 
   // Compute the path to the resource directory.

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7952.20878.patch
Type: text/x-patch
Size: 522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150227/5cff52a4/attachment.bin>


More information about the cfe-commits mailing list