]> granicus.if.org Git - clang/commitdiff
Fix program name in "clang -help"
authorSumanth Gundapaneni <sgundapa@codeaurora.org>
Tue, 3 Mar 2015 20:43:12 +0000 (20:43 +0000)
committerSumanth Gundapaneni <sgundapa@codeaurora.org>
Tue, 3 Mar 2015 20:43:12 +0000 (20:43 +0000)
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>

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

lib/Driver/Driver.cpp

index 61aaa9751be853fb4a8fd23dd570f1a87b355f89..a0c9233dd549ddb79056c466746de61b3af4e6a4 100644 (file)
@@ -57,7 +57,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple,
       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.