From: Sumanth Gundapaneni Date: Tue, 3 Mar 2015 20:43:12 +0000 (+0000) Subject: Fix program name in "clang -help" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5daa3fa41a776ee0007f052ceaacb16d505bcd4f;p=clang Fix program name in "clang -help" With out this patch, "clang -help" prints "USAGE: clang-3 [options] ". It should either print USAGE: clang [options] or USAGE: clang-3.7 [options] With this patch, on Linux, it prints USAGE: clang-3.7 [options] On Windows, it prints USAGE: clang.exe [options] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231124 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 61aaa9751b..a0c9233dd5 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -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.